-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split SymDB payload when too large #7838
Conversation
SymDB payload cannot be larger than 50MB otherwise datadog agent will generate an error. When serializing the upload request we are now verifying that we are below this limit, otherwise we are splitting the payload first by uploading by jar scope, but if a jar scope is still large we are splitting by class scopes. If down to one class the payload is still too large we are dropping the upload.
Debugger benchmarksParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 5 unstable metrics.
See unchanged results
Request duration reports for reportsgantt
title reports - request duration [CI 0.99] : candidate=None, baseline=None
dateFormat X
axisFormat %s
section baseline
noprobe (339.937 µs) : 314, 366
. : milestone, 340,
basic (343.257 µs) : 334, 353
. : milestone, 343,
loop (10.958 ms) : 10888, 11027
. : milestone, 10958,
section candidate
noprobe (346.897 µs) : 303, 391
. : milestone, 347,
basic (334.898 µs) : 324, 346
. : milestone, 335,
loop (11.004 ms) : 10980, 11029
. : milestone, 11004,
|
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 53 metrics, 10 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.42.0-SNAPSHOT~fdac37ce4a, baseline=1.42.0-SNAPSHOT~7010cb865c
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.086 s) : 0, 1086181
Total [baseline] (8.608 s) : 0, 8607504
Agent [candidate] (1.095 s) : 0, 1094701
Total [candidate] (8.631 s) : 0, 8631328
section iast
Agent [baseline] (1.207 s) : 0, 1207345
Total [baseline] (9.204 s) : 0, 9204414
Agent [candidate] (1.213 s) : 0, 1213254
Total [candidate] (9.169 s) : 0, 9168997
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.222 s) : 0, 1222038
Total [baseline] (9.158 s) : 0, 9158437
Agent [candidate] (1.211 s) : 0, 1211476
Total [candidate] (9.136 s) : 0, 9136046
section iast_TELEMETRY_OFF
Agent [baseline] (1.22 s) : 0, 1220136
Total [baseline] (9.221 s) : 0, 9220546
Agent [candidate] (1.215 s) : 0, 1214827
Total [candidate] (9.175 s) : 0, 9174617
gantt
title insecure-bank - break down per module: candidate=1.42.0-SNAPSHOT~fdac37ce4a, baseline=1.42.0-SNAPSHOT~7010cb865c
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (691.857 ms) : 0, 691857
BytebuddyAgent [candidate] (697.848 ms) : 0, 697848
GlobalTracer [baseline] (316.3 ms) : 0, 316300
GlobalTracer [candidate] (317.446 ms) : 0, 317446
AppSec [baseline] (54.327 ms) : 0, 54327
AppSec [candidate] (54.766 ms) : 0, 54766
Remote Config [baseline] (671.327 µs) : 0, 671
Remote Config [candidate] (672.952 µs) : 0, 673
Telemetry [baseline] (9.206 ms) : 0, 9206
Telemetry [candidate] (9.98 ms) : 0, 9980
section iast
BytebuddyAgent [baseline] (803.891 ms) : 0, 803891
BytebuddyAgent [candidate] (808.098 ms) : 0, 808098
GlobalTracer [baseline] (304.449 ms) : 0, 304449
GlobalTracer [candidate] (304.683 ms) : 0, 304683
AppSec [baseline] (57.528 ms) : 0, 57528
AppSec [candidate] (58.072 ms) : 0, 58072
IAST [baseline] (19.653 ms) : 0, 19653
IAST [candidate] (20.524 ms) : 0, 20524
Remote Config [baseline] (593.246 µs) : 0, 593
Remote Config [candidate] (609.953 µs) : 0, 610
Telemetry [baseline] (7.44 ms) : 0, 7440
Telemetry [candidate] (7.476 ms) : 0, 7476
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (814.02 ms) : 0, 814020
BytebuddyAgent [candidate] (809.027 ms) : 0, 809027
GlobalTracer [baseline] (308.001 ms) : 0, 308001
GlobalTracer [candidate] (302.34 ms) : 0, 302340
AppSec [baseline] (56.953 ms) : 0, 56953
AppSec [candidate] (56.95 ms) : 0, 56950
IAST [baseline] (21.01 ms) : 0, 21010
IAST [candidate] (21.198 ms) : 0, 21198
Remote Config [baseline] (623.058 µs) : 0, 623
Remote Config [candidate] (605.19 µs) : 0, 605
Telemetry [baseline] (7.525 ms) : 0, 7525
Telemetry [candidate] (7.489 ms) : 0, 7489
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (811.748 ms) : 0, 811748
BytebuddyAgent [candidate] (808.613 ms) : 0, 808613
GlobalTracer [baseline] (308.222 ms) : 0, 308222
GlobalTracer [candidate] (305.13 ms) : 0, 305130
AppSec [baseline] (58.213 ms) : 0, 58213
AppSec [candidate] (58.445 ms) : 0, 58445
IAST [baseline] (19.966 ms) : 0, 19966
IAST [candidate] (20.587 ms) : 0, 20587
Remote Config [baseline] (626.602 µs) : 0, 627
Remote Config [candidate] (676.562 µs) : 0, 677
Telemetry [baseline] (7.454 ms) : 0, 7454
Telemetry [candidate] (7.491 ms) : 0, 7491
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.42.0-SNAPSHOT~fdac37ce4a, baseline=1.42.0-SNAPSHOT~7010cb865c
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.093 s) : 0, 1093036
Total [baseline] (10.514 s) : 0, 10514190
Agent [candidate] (1.079 s) : 0, 1078947
Total [candidate] (10.463 s) : 0, 10463098
section appsec
Agent [baseline] (1.219 s) : 0, 1219303
Total [baseline] (10.693 s) : 0, 10693332
Agent [candidate] (1.216 s) : 0, 1215691
Total [candidate] (10.701 s) : 0, 10701133
section iast
Agent [baseline] (1.208 s) : 0, 1207767
Total [baseline] (10.934 s) : 0, 10934394
Agent [candidate] (1.216 s) : 0, 1216087
Total [candidate] (10.965 s) : 0, 10965332
section profiling
Agent [baseline] (1.281 s) : 0, 1281447
Total [baseline] (10.769 s) : 0, 10769122
Agent [candidate] (1.288 s) : 0, 1287757
Total [candidate] (10.839 s) : 0, 10838953
gantt
title petclinic - break down per module: candidate=1.42.0-SNAPSHOT~fdac37ce4a, baseline=1.42.0-SNAPSHOT~7010cb865c
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (696.773 ms) : 0, 696773
BytebuddyAgent [candidate] (688.407 ms) : 0, 688407
GlobalTracer [baseline] (318.515 ms) : 0, 318515
GlobalTracer [candidate] (313.722 ms) : 0, 313722
AppSec [baseline] (54.586 ms) : 0, 54586
AppSec [candidate] (53.945 ms) : 0, 53945
Remote Config [baseline] (667.61 µs) : 0, 668
Remote Config [candidate] (650.832 µs) : 0, 651
Telemetry [baseline] (8.538 ms) : 0, 8538
Telemetry [candidate] (8.468 ms) : 0, 8468
section appsec
BytebuddyAgent [baseline] (706.45 ms) : 0, 706450
BytebuddyAgent [candidate] (705.131 ms) : 0, 705131
GlobalTracer [baseline] (313.742 ms) : 0, 313742
GlobalTracer [candidate] (311.231 ms) : 0, 311231
AppSec [baseline] (166.274 ms) : 0, 166274
AppSec [candidate] (166.888 ms) : 0, 166888
Remote Config [baseline] (636.681 µs) : 0, 637
Remote Config [candidate] (629.191 µs) : 0, 629
Telemetry [baseline] (8.362 ms) : 0, 8362
Telemetry [candidate] (8.394 ms) : 0, 8394
IAST [baseline] (20.18 ms) : 0, 20180
IAST [candidate] (19.388 ms) : 0, 19388
section iast
BytebuddyAgent [baseline] (803.946 ms) : 0, 803946
BytebuddyAgent [candidate] (810.388 ms) : 0, 810388
GlobalTracer [baseline] (304.851 ms) : 0, 304851
GlobalTracer [candidate] (304.867 ms) : 0, 304867
AppSec [baseline] (54.869 ms) : 0, 54869
AppSec [candidate] (57.384 ms) : 0, 57384
Remote Config [baseline] (670.796 µs) : 0, 671
Remote Config [candidate] (600.329 µs) : 0, 600
Telemetry [baseline] (7.426 ms) : 0, 7426
Telemetry [candidate] (7.531 ms) : 0, 7531
IAST [baseline] (22.252 ms) : 0, 22252
IAST [candidate] (21.465 ms) : 0, 21465
section profiling
ProfilingAgent [baseline] (90.651 ms) : 0, 90651
ProfilingAgent [candidate] (92.978 ms) : 0, 92978
BytebuddyAgent [baseline] (683.11 ms) : 0, 683110
BytebuddyAgent [candidate] (687.485 ms) : 0, 687485
GlobalTracer [baseline] (400.179 ms) : 0, 400179
GlobalTracer [candidate] (399.32 ms) : 0, 399320
AppSec [baseline] (54.549 ms) : 0, 54549
AppSec [candidate] (55.122 ms) : 0, 55122
Remote Config [baseline] (660.627 µs) : 0, 661
Remote Config [candidate] (667.083 µs) : 0, 667
Telemetry [baseline] (13.365 ms) : 0, 13365
Telemetry [candidate] (12.957 ms) : 0, 12957
Profiling [baseline] (90.674 ms) : 0, 90674
Profiling [candidate] (93.002 ms) : 0, 93002
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 17 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.42.0-SNAPSHOT~fdac37ce4a, baseline=1.42.0-SNAPSHOT~7010cb865c
dateFormat X
axisFormat %s
section baseline
no_agent (381.127 µs) : 361, 401
. : milestone, 381,
iast (496.854 µs) : 475, 519
. : milestone, 497,
iast_FULL (654.001 µs) : 633, 675
. : milestone, 654,
iast_GLOBAL (516.28 µs) : 495, 538
. : milestone, 516,
iast_HARDCODED_SECRET_DISABLED (490.802 µs) : 470, 512
. : milestone, 491,
iast_INACTIVE (452.838 µs) : 432, 474
. : milestone, 453,
iast_TELEMETRY_OFF (483.379 µs) : 462, 505
. : milestone, 483,
tracing (448.113 µs) : 427, 469
. : milestone, 448,
section candidate
no_agent (375.075 µs) : 356, 394
. : milestone, 375,
iast (494.056 µs) : 473, 515
. : milestone, 494,
iast_FULL (568.448 µs) : 547, 590
. : milestone, 568,
iast_GLOBAL (519.056 µs) : 497, 541
. : milestone, 519,
iast_HARDCODED_SECRET_DISABLED (492.694 µs) : 471, 515
. : milestone, 493,
iast_INACTIVE (453.92 µs) : 432, 475
. : milestone, 454,
iast_TELEMETRY_OFF (481.394 µs) : 460, 503
. : milestone, 481,
tracing (447.44 µs) : 426, 468
. : milestone, 447,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.42.0-SNAPSHOT~fdac37ce4a, baseline=1.42.0-SNAPSHOT~7010cb865c
dateFormat X
axisFormat %s
section baseline
no_agent (1.347 ms) : 1327, 1367
. : milestone, 1347,
appsec (1.742 ms) : 1719, 1765
. : milestone, 1742,
appsec_no_iast (1.726 ms) : 1702, 1750
. : milestone, 1726,
iast (1.487 ms) : 1464, 1509
. : milestone, 1487,
profiling (1.504 ms) : 1480, 1529
. : milestone, 1504,
tracing (1.479 ms) : 1453, 1504
. : milestone, 1479,
section candidate
no_agent (1.338 ms) : 1319, 1357
. : milestone, 1338,
appsec (1.741 ms) : 1718, 1765
. : milestone, 1741,
appsec_no_iast (1.752 ms) : 1728, 1775
. : milestone, 1752,
iast (1.488 ms) : 1465, 1510
. : milestone, 1488,
profiling (1.485 ms) : 1462, 1508
. : milestone, 1485,
tracing (1.459 ms) : 1435, 1484
. : milestone, 1459,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.42.0-SNAPSHOT~fdac37ce4a, baseline=1.42.0-SNAPSHOT~7010cb865c
dateFormat X
axisFormat %s
section baseline
no_agent (1.469 ms) : 1458, 1481
. : milestone, 1469,
appsec (2.358 ms) : 2317, 2400
. : milestone, 2358,
iast (2.08 ms) : 2028, 2132
. : milestone, 2080,
iast_GLOBAL (2.124 ms) : 2072, 2176
. : milestone, 2124,
profiling (1.95 ms) : 1908, 1992
. : milestone, 1950,
tracing (1.913 ms) : 1874, 1953
. : milestone, 1913,
section candidate
no_agent (1.469 ms) : 1458, 1480
. : milestone, 1469,
appsec (2.343 ms) : 2302, 2384
. : milestone, 2343,
iast (2.083 ms) : 2031, 2135
. : milestone, 2083,
iast_GLOBAL (2.118 ms) : 2067, 2170
. : milestone, 2118,
profiling (1.949 ms) : 1908, 1991
. : milestone, 1949,
tracing (1.933 ms) : 1893, 1973
. : milestone, 1933,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.42.0-SNAPSHOT~fdac37ce4a, baseline=1.42.0-SNAPSHOT~7010cb865c
dateFormat X
axisFormat %s
section baseline
no_agent (15.034 s) : 15034000, 15034000
. : milestone, 15034000,
appsec (15.153 s) : 15153000, 15153000
. : milestone, 15153000,
iast (18.268 s) : 18268000, 18268000
. : milestone, 18268000,
iast_GLOBAL (17.895 s) : 17895000, 17895000
. : milestone, 17895000,
profiling (15.192 s) : 15192000, 15192000
. : milestone, 15192000,
tracing (15.282 s) : 15282000, 15282000
. : milestone, 15282000,
section candidate
no_agent (14.871 s) : 14871000, 14871000
. : milestone, 14871000,
appsec (15.296 s) : 15296000, 15296000
. : milestone, 15296000,
iast (18.747 s) : 18747000, 18747000
. : milestone, 18747000,
iast_GLOBAL (18.097 s) : 18097000, 18097000
. : milestone, 18097000,
profiling (14.93 s) : 14930000, 14930000
. : milestone, 14930000,
tracing (15.114 s) : 15114000, 15114000
. : milestone, 15114000,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this solves it - and we need to ensure that duplicated jar scope are supported by the backend. so the backend would be smart enough to merge the same jar scope if it come from same runtime-id.
We are serializing things again and agin if we hit that max size limit, we should put some metric/diagnostics to see if that happen to often - if it does - we might want to refactor to split earlier.
secondHalf.size()); | ||
splitAndSend( | ||
Arrays.asList( | ||
createJarScope(jarScope.getName(), firstHalf), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ojung - how having two jar scope would work at the backend?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is supported since a while ago. It's also supported for dll
and module
.
json.getBytes(StandardCharsets.UTF_8), "file", "file.json")); | ||
} | ||
} else { | ||
LOGGER.warn( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, dropping all those jars? maybe we do the same splitting by two for jars case...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
event, | ||
new BatchUploader.MultiPartContent( | ||
json.getBytes(StandardCharsets.UTF_8), "file", "file.json")); | ||
if (json.length() > maxPayloadSize) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because we already calculated json.length() -> we can tell how much we need to split...
aka, chunks = Math.ciel(json.length()/maxPayloadSize).
this can avoid the other bug when we try to upload too many small jars and drop all of them
What Does This Do
SymDB payload cannot be larger than 50MB otherwise datadog agent will generate an error. When serializing the upload request we are now verifying that we are below this limit, otherwise we are splitting the payload first by uploading by jar scope, but if a jar scope is still large we are splitting by class scopes. If down to one class the payload is still too large we are dropping the upload.
Motivation
Additional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: DEBUG-3068