Store accumulator-stage lookups directly#10645
Draft
charlesmyu wants to merge 1 commit intocharles.yu/djm-0000/fix-spark-plan-metricsfrom
Draft
Store accumulator-stage lookups directly#10645charlesmyu wants to merge 1 commit intocharles.yu/djm-0000/fix-spark-plan-metricsfrom
charlesmyu wants to merge 1 commit intocharles.yu/djm-0000/fix-spark-plan-metricsfrom
Conversation
e52fbc5 to
e413d1d
Compare
e1c532c to
9594586
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 61 metrics, 10 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.60.0-SNAPSHOT~780cd6f04a, baseline=1.60.0-SNAPSHOT~f453b4e500
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.074 s) : 0, 1073925
Total [baseline] (8.761 s) : 0, 8760551
Agent [candidate] (1.067 s) : 0, 1066597
Total [candidate] (8.744 s) : 0, 8743742
section iast
Agent [baseline] (1.234 s) : 0, 1234137
Total [baseline] (9.368 s) : 0, 9367935
Agent [candidate] (1.228 s) : 0, 1228039
Total [candidate] (9.353 s) : 0, 9353279
gantt
title insecure-bank - break down per module: candidate=1.60.0-SNAPSHOT~780cd6f04a, baseline=1.60.0-SNAPSHOT~f453b4e500
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.224 ms) : 0, 1224
crashtracking [candidate] (1.179 ms) : 0, 1179
BytebuddyAgent [baseline] (635.763 ms) : 0, 635763
BytebuddyAgent [candidate] (628.68 ms) : 0, 628680
AgentMeter [baseline] (29.26 ms) : 0, 29260
AgentMeter [candidate] (28.907 ms) : 0, 28907
GlobalTracer [baseline] (258.951 ms) : 0, 258951
GlobalTracer [candidate] (257.881 ms) : 0, 257881
AppSec [baseline] (33.151 ms) : 0, 33151
AppSec [candidate] (32.926 ms) : 0, 32926
Debugger [baseline] (64.141 ms) : 0, 64141
Debugger [candidate] (62.843 ms) : 0, 62843
Remote Config [baseline] (620.233 µs) : 0, 620
Remote Config [candidate] (632.886 µs) : 0, 633
Telemetry [baseline] (10.618 ms) : 0, 10618
Telemetry [candidate] (9.882 ms) : 0, 9882
Flare Poller [baseline] (3.763 ms) : 0, 3763
Flare Poller [candidate] (7.607 ms) : 0, 7607
section iast
crashtracking [baseline] (1.2 ms) : 0, 1200
crashtracking [candidate] (1.191 ms) : 0, 1191
BytebuddyAgent [baseline] (798.253 ms) : 0, 798253
BytebuddyAgent [candidate] (794.065 ms) : 0, 794065
AgentMeter [baseline] (11.468 ms) : 0, 11468
AgentMeter [candidate] (11.255 ms) : 0, 11255
GlobalTracer [baseline] (247.563 ms) : 0, 247563
GlobalTracer [candidate] (247.193 ms) : 0, 247193
IAST [baseline] (27.152 ms) : 0, 27152
IAST [candidate] (26.839 ms) : 0, 26839
AppSec [baseline] (33.075 ms) : 0, 33075
AppSec [candidate] (34.736 ms) : 0, 34736
Debugger [baseline] (66.625 ms) : 0, 66625
Debugger [candidate] (64.264 ms) : 0, 64264
Remote Config [baseline] (540.471 µs) : 0, 540
Remote Config [candidate] (533.701 µs) : 0, 534
Telemetry [baseline] (8.709 ms) : 0, 8709
Telemetry [candidate] (8.612 ms) : 0, 8612
Flare Poller [baseline] (3.458 ms) : 0, 3458
Flare Poller [candidate] (3.446 ms) : 0, 3446
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.60.0-SNAPSHOT~780cd6f04a, baseline=1.60.0-SNAPSHOT~f453b4e500
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.07 s) : 0, 1070407
Total [baseline] (10.799 s) : 0, 10799081
Agent [candidate] (1.074 s) : 0, 1074287
Total [candidate] (10.956 s) : 0, 10956289
section appsec
Agent [baseline] (1.24 s) : 0, 1239797
Total [baseline] (10.98 s) : 0, 10979974
Agent [candidate] (1.24 s) : 0, 1240060
Total [candidate] (11.002 s) : 0, 11002410
section iast
Agent [baseline] (1.233 s) : 0, 1233129
Total [baseline] (11.148 s) : 0, 11148070
Agent [candidate] (1.228 s) : 0, 1227811
Total [candidate] (11.155 s) : 0, 11155454
section profiling
Agent [baseline] (1.19 s) : 0, 1190329
Total [baseline] (10.896 s) : 0, 10895675
Agent [candidate] (1.199 s) : 0, 1199262
Total [candidate] (10.998 s) : 0, 10997619
gantt
title petclinic - break down per module: candidate=1.60.0-SNAPSHOT~780cd6f04a, baseline=1.60.0-SNAPSHOT~f453b4e500
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.203 ms) : 0, 1203
crashtracking [candidate] (1.207 ms) : 0, 1207
BytebuddyAgent [baseline] (631.798 ms) : 0, 631798
BytebuddyAgent [candidate] (633.196 ms) : 0, 633196
AgentMeter [baseline] (29.34 ms) : 0, 29340
AgentMeter [candidate] (29.285 ms) : 0, 29285
GlobalTracer [baseline] (257.525 ms) : 0, 257525
GlobalTracer [candidate] (259.056 ms) : 0, 259056
AppSec [baseline] (33.09 ms) : 0, 33090
AppSec [candidate] (33.148 ms) : 0, 33148
Debugger [baseline] (65.379 ms) : 0, 65379
Debugger [candidate] (64.1 ms) : 0, 64100
Remote Config [baseline] (621.297 µs) : 0, 621
Remote Config [candidate] (623.275 µs) : 0, 623
Telemetry [baseline] (10.75 ms) : 0, 10750
Telemetry [candidate] (11.376 ms) : 0, 11376
Flare Poller [baseline] (4.534 ms) : 0, 4534
Flare Poller [candidate] (6.144 ms) : 0, 6144
section appsec
crashtracking [baseline] (1.183 ms) : 0, 1183
crashtracking [candidate] (1.193 ms) : 0, 1193
BytebuddyAgent [baseline] (658.918 ms) : 0, 658918
BytebuddyAgent [candidate] (658.361 ms) : 0, 658361
AgentMeter [baseline] (11.942 ms) : 0, 11942
AgentMeter [candidate] (11.917 ms) : 0, 11917
GlobalTracer [baseline] (258.25 ms) : 0, 258250
GlobalTracer [candidate] (258.441 ms) : 0, 258441
IAST [baseline] (25.259 ms) : 0, 25259
IAST [candidate] (25.388 ms) : 0, 25388
AppSec [baseline] (167.879 ms) : 0, 167879
AppSec [candidate] (168.017 ms) : 0, 168017
Debugger [baseline] (66.552 ms) : 0, 66552
Debugger [candidate] (66.919 ms) : 0, 66919
Remote Config [baseline] (642.318 µs) : 0, 642
Remote Config [candidate] (644.036 µs) : 0, 644
Telemetry [baseline] (9.458 ms) : 0, 9458
Telemetry [candidate] (9.506 ms) : 0, 9506
Flare Poller [baseline] (3.744 ms) : 0, 3744
Flare Poller [candidate] (3.711 ms) : 0, 3711
section iast
crashtracking [baseline] (1.187 ms) : 0, 1187
crashtracking [candidate] (1.181 ms) : 0, 1181
BytebuddyAgent [baseline] (796.981 ms) : 0, 796981
BytebuddyAgent [candidate] (793.849 ms) : 0, 793849
AgentMeter [baseline] (11.29 ms) : 0, 11290
AgentMeter [candidate] (11.258 ms) : 0, 11258
GlobalTracer [baseline] (247.326 ms) : 0, 247326
GlobalTracer [candidate] (246.752 ms) : 0, 246752
IAST [baseline] (27.178 ms) : 0, 27178
IAST [candidate] (26.812 ms) : 0, 26812
AppSec [baseline] (32.302 ms) : 0, 32302
AppSec [candidate] (35.301 ms) : 0, 35301
Debugger [baseline] (68.308 ms) : 0, 68308
Debugger [candidate] (64.17 ms) : 0, 64170
Remote Config [baseline] (530.183 µs) : 0, 530
Remote Config [candidate] (534.844 µs) : 0, 535
Telemetry [baseline] (8.575 ms) : 0, 8575
Telemetry [candidate] (8.624 ms) : 0, 8624
Flare Poller [baseline] (3.478 ms) : 0, 3478
Flare Poller [candidate] (3.477 ms) : 0, 3477
section profiling
crashtracking [baseline] (1.185 ms) : 0, 1185
crashtracking [candidate] (1.192 ms) : 0, 1192
BytebuddyAgent [baseline] (682.093 ms) : 0, 682093
BytebuddyAgent [candidate] (686.872 ms) : 0, 686872
AgentMeter [baseline] (8.551 ms) : 0, 8551
AgentMeter [candidate] (8.645 ms) : 0, 8645
GlobalTracer [baseline] (216.067 ms) : 0, 216067
GlobalTracer [candidate] (217.539 ms) : 0, 217539
AppSec [baseline] (32.418 ms) : 0, 32418
AppSec [candidate] (32.943 ms) : 0, 32943
Debugger [baseline] (67.115 ms) : 0, 67115
Debugger [candidate] (66.853 ms) : 0, 66853
Remote Config [baseline] (621.381 µs) : 0, 621
Remote Config [candidate] (637.424 µs) : 0, 637
Telemetry [baseline] (8.968 ms) : 0, 8968
Telemetry [candidate] (9.827 ms) : 0, 9827
Flare Poller [baseline] (3.747 ms) : 0, 3747
Flare Poller [candidate] (3.767 ms) : 0, 3767
ProfilingAgent [baseline] (98.942 ms) : 0, 98942
ProfilingAgent [candidate] (100.145 ms) : 0, 100145
Profiling [baseline] (99.508 ms) : 0, 99508
Profiling [candidate] (100.722 ms) : 0, 100722
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 0 performance regressions! Performance is the same for 19 metrics, 15 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.60.0-SNAPSHOT~780cd6f04a, baseline=1.60.0-SNAPSHOT~f453b4e500
dateFormat X
axisFormat %s
section baseline
no_agent (1.172 ms) : 1161, 1183
. : milestone, 1172,
iast (3.162 ms) : 3121, 3204
. : milestone, 3162,
iast_FULL (5.873 ms) : 5813, 5932
. : milestone, 5873,
iast_GLOBAL (3.646 ms) : 3588, 3703
. : milestone, 3646,
profiling (2.273 ms) : 2249, 2296
. : milestone, 2273,
tracing (1.827 ms) : 1810, 1844
. : milestone, 1827,
section candidate
no_agent (1.188 ms) : 1176, 1199
. : milestone, 1188,
iast (3.178 ms) : 3134, 3222
. : milestone, 3178,
iast_FULL (6.072 ms) : 6010, 6133
. : milestone, 6072,
iast_GLOBAL (3.54 ms) : 3485, 3595
. : milestone, 3540,
profiling (2.228 ms) : 2207, 2249
. : milestone, 2228,
tracing (1.822 ms) : 1807, 1838
. : milestone, 1822,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.60.0-SNAPSHOT~780cd6f04a, baseline=1.60.0-SNAPSHOT~f453b4e500
dateFormat X
axisFormat %s
section baseline
no_agent (18.183 ms) : 17995, 18371
. : milestone, 18183,
appsec (18.541 ms) : 18356, 18726
. : milestone, 18541,
code_origins (18.518 ms) : 18333, 18702
. : milestone, 18518,
iast (17.624 ms) : 17449, 17799
. : milestone, 17624,
profiling (18.775 ms) : 18587, 18964
. : milestone, 18775,
tracing (17.734 ms) : 17558, 17910
. : milestone, 17734,
section candidate
no_agent (17.818 ms) : 17638, 17998
. : milestone, 17818,
appsec (18.365 ms) : 18181, 18549
. : milestone, 18365,
code_origins (17.341 ms) : 17172, 17511
. : milestone, 17341,
iast (17.801 ms) : 17621, 17980
. : milestone, 17801,
profiling (18.865 ms) : 18680, 19050
. : milestone, 18865,
tracing (18.572 ms) : 18386, 18758
. : milestone, 18572,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.60.0-SNAPSHOT~780cd6f04a, baseline=1.60.0-SNAPSHOT~f453b4e500
dateFormat X
axisFormat %s
section baseline
no_agent (1.483 ms) : 1472, 1495
. : milestone, 1483,
appsec (2.582 ms) : 2524, 2640
. : milestone, 2582,
iast (2.275 ms) : 2206, 2345
. : milestone, 2275,
iast_GLOBAL (2.306 ms) : 2237, 2376
. : milestone, 2306,
profiling (2.098 ms) : 2043, 2153
. : milestone, 2098,
tracing (2.08 ms) : 2026, 2134
. : milestone, 2080,
section candidate
no_agent (1.48 ms) : 1469, 1492
. : milestone, 1480,
appsec (3.792 ms) : 3570, 4015
. : milestone, 3792,
iast (2.26 ms) : 2191, 2330
. : milestone, 2260,
iast_GLOBAL (2.311 ms) : 2241, 2381
. : milestone, 2311,
profiling (2.089 ms) : 2034, 2144
. : milestone, 2089,
tracing (2.081 ms) : 2027, 2136
. : milestone, 2081,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.60.0-SNAPSHOT~780cd6f04a, baseline=1.60.0-SNAPSHOT~f453b4e500
dateFormat X
axisFormat %s
section baseline
no_agent (14.674 s) : 14674000, 14674000
. : milestone, 14674000,
appsec (14.693 s) : 14693000, 14693000
. : milestone, 14693000,
iast (18.161 s) : 18161000, 18161000
. : milestone, 18161000,
iast_GLOBAL (17.985 s) : 17985000, 17985000
. : milestone, 17985000,
profiling (15.454 s) : 15454000, 15454000
. : milestone, 15454000,
tracing (14.681 s) : 14681000, 14681000
. : milestone, 14681000,
section candidate
no_agent (15.46 s) : 15460000, 15460000
. : milestone, 15460000,
appsec (14.791 s) : 14791000, 14791000
. : milestone, 14791000,
iast (18.058 s) : 18058000, 18058000
. : milestone, 18058000,
iast_GLOBAL (17.756 s) : 17756000, 17756000
. : milestone, 17756000,
profiling (14.908 s) : 14908000, 14908000
. : milestone, 14908000,
tracing (14.44 s) : 14440000, 14440000
. : milestone, 14440000,
|
e413d1d to
89df516
Compare
9594586 to
cb6648d
Compare
89df516 to
8651527
Compare
cb6648d to
780cd6f
Compare
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What Does This Do
Stores the map of accumulator ID to stage ID directly in a
Long-Integermap, rather than storing the stage-level accumulators themselves.Motivation
The stage-level accumulators naively roll up metrics from the task level by summing all values. This means they are not accurate in all cases, particular for metrics that are better visualized as a distribution of values across all tasks instead of a single sum.
In #10553 we rollup task-level metrics ourselves and encode them into the Spark SQL metrics as distributions in order to improve the granularity of information collected. This left one remaining use of the stage-level accumulators - mapping operations in Spark SQL plans to their respective stages.
Since we do not need the entire accumulator to accomplish this, we should simplify that to a ID-ID map instead to save space. We can also remove the 50k limit since we are not storing the entire accumulator, allowing us to avoid creating orphaned operations (previously occurred when the
EldestHashMapoverflowed).Additional Notes
I didn't feel the explicit need for a FF here, since the change is fairly straightforwards and shouldn't negatively impact perf. However, if we feel strongly otherwise I'm happy to make that happen.
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]
Note: Once your PR is ready to merge, add it to the merge queue by commenting
/merge./merge -ccancels the queue request./merge -f --reason "reason"skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.