luoyuqinlaura commented on code in PR #59966:
URL: https://github.com/apache/spark/pull/59966#discussion_r4647346402
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/ui/SQLAppStatusListener.scala:
##########
@@ -506,7 +508,7 @@ private class LiveExecutionData(val executionId: Long)
extends LiveEntity {
var jobs = Map[Int, JobExecutionStatus]()
var stages = Set[Int]()
- var driverAccumUpdates = Seq[(Long, Long)]()
+ var driverAccumUpdates = Vector[(Long, Long)]()
Review Comment:
You are right that ++ only runs once per event, so the Vector change does
not help here. I have no workload with many separate events, so I dropped it
and kept only the grouping in aggregateMetrics.
The case we hit is a single SparkListenerDriverAccumUpdates event carrying a
very large number of entries for one accumulator id. I replayed an event log
with this shape through FsHistoryProvider.rebuildAppStore (the same path as
SHS), with N entries for one id:
| N | master | this PR |
|---|---|---|
| 250K | 10.4 s | 0.5 s |
| 500K | 38.2 s | 0.8 s |
| 1M | 147.9 s | 1.1 s |
master grows quadratically (2x N is about 3.7x time), this PR roughly
linearly. These are single runs, with the large event truncated to N entries so
it fits in memory on a laptop. I cannot share the original log.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]