WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@amarziali
Copy link
Contributor

@amarziali amarziali commented Nov 3, 2025

What Does This Do

This PR introduces a set of queue implementations in order to replace the JCTools-based queues, eliminating direct usage of sun.misc.Unsafe and providing full compatibility with Java 9+ runtimes through the VarHandle API.

The goal is to achieve similar high-performance concurrent queue behavior as JCTools while using supported, standard Java mechanisms.

A new Queues factory class is introduced to dynamically select the optimal queue implementation based on the Java runtime environment:

  • On Java 9 and newer, the factory instantiates the new VarHandle-based queues
  • On Java 1.8, it falls back to the existing JCTools-based queues to maintain backward compatibility and performance consistency.

Introduced Classes Summary

Class Pattern Description
SpscArrayQueueVarHandle Single-Producer / Single-Consumer Wait-free queue optimized for single-threaded access on both ends. Uses acquire/release semantics for minimal memory ordering overhead.
SpmcArrayQueueVarHandle Single-Producer / Multiple-Consumer Wait-free producer with lock-free consumers competing via CAS on the head index. Uses cached consumerLimit to reduce contention on producer index reads.
MpscArrayQueueVarHandle<E> Multiple-Producer / Single-Consumer Lock-free producers compete via CAS on the tail index, with a wait-free consumer. Maintains cached producerLimit to minimize expensive head index reads.
MpscBlockingConsumerArrayQueueVarHandle<E> Multiple-Producer / Single-Consumer (Blocking) MPSC queue with efficient blocking support for the consumer. Uses the low bit of the producer index to signal blocked state, enabling producers to wake the consumer via LockSupport.unpark() without locks.

Memory Padding

All queue state fields (head, tail, cached limits, etc.) are cache-line padded to prevent false sharing between producers and consumers.
This ensures that frequently accessed hot fields do not reside on the same cache line across threads, minimizing cache invalidations and improving throughput under contention.

Memory Ordering Semantics

VarHandle access modes are carefully chosen to balance performance and correctness, using the weakest ordering that maintains visibility guarantees:

  • setRelease / getAcquire — Element publication and consumption. Release stores guarantee all preceding writes are visible before the element, while acquire loads ensure all subsequent reads see the published data. Provides efficient producer-consumer synchronization without full memory barriers.
  • getOpaque — Hot-path reads of cached limits and blocked state. Ensures atomic access and eventual visibility without memory fence overhead. Safe when stale reads are benign (e.g., cached producerLimit triggers recalculation on mismatch, or when subsequent CAS provides full synchronization).
  • getVolatile — Synchronization points requiring immediate visibility. Used when refreshing producer/consumer limits or checking queue state where correctness depends on seeing the latest value from other threads. Provides sequential consistency with full memory barriers.
  • Plain access (get / set) — Single-threaded paths where no inter-thread coordination is needed (e.g., single consumer reading its own index).

Queue Benchmark Results

SPSC (Single-Producer / Single-Consumer)

Capacity = 1024
Operation JCTools (ops/us ± err) VarHandle (ops/us ± err)
Total 285,696 ± 397,530 180,354 ± 315,780
Produce 141,966 ± 205,795 89,810 ± 160,517
Consume 143,730 ± 191,736 90,544 ± 155,265
Capacity = 65536
Operation JCTools (ops/us ± err) VarHandle (ops/us ± err)
Total 546,439 ± 304,146 449,770 ± 4,365
Produce 273,143 ± 152,509 224,833 ± 2,992
Consume 273,296 ± 151,645 224,937 ± 1,432

MPSC (Multi-Producer / Single-Consumer)

Capacity = 1024
Operation JCTools (ops/us ± err) VarHandle (ops/us ± err)
Total 26,429 ± 24,149 19,453 ± 31,615
Produce 8,919 ± 3,046 8,055 ± 12,486
Consume 17,510 ± 23,328 11,398 ± 40,952
Capacity = 65536
Operation JCTools (ops/us ± err) VarHandle (ops/us ± err)
Total 24,071 ± 71,594 22,795 ± 55,130
Produce 7,361 ± 18,533 7,604 ± 4,840
Consume 16,710 ± 88,477 15,191 ± 59,717

MPSC (Blocking Consumer)

Capacity = 1024
Operation JCTools (ops/us ± err) VarHandle (ops/us ± err)
Total 31,150 ± 211,089 18,202 ± 11,319
Produce 7,244 ± 9,645 8,066 ± 14,697
Consume 23,906 ± 215,572 10,136 ± 5,535
Capacity = 65536
Operation JCTools (ops/us ± err) VarHandle (ops/us ± err)
Total 27,277 ± 69,378 19,187 ± 40,915
Produce 6,224 ± 11,748 7,300 ± 9,286
Consume 21,053 ± 64,255 11,887 ± 39,520

Takeaways:

  • MPSC queues can be replaced with a VarHandle equivalent. In some cases, the new implementation shows even better performances.
  • jctools still outperforms generally speaking. However the measurements show a high error variance. Better tests can be done by increasing the iterations and/or the forks

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@datadog-datadog-prod-us1

This comment has been minimized.

@pr-commenter
Copy link

pr-commenter bot commented Nov 3, 2025

Debugger benchmarks

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
ci_job_date 1762350659 1762351004
end_time 2025-11-05T13:52:20 2025-11-05T13:58:05
git_branch master andrea.marziali/remove-jctools-queues
git_commit_sha 8db72c0 a880c67
start_time 2025-11-05T13:51:00 2025-11-05T13:56:45
See matching parameters
Baseline Candidate
ci_job_id 1217030429 1217030429
ci_pipeline_id 81317491 81317491
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
git_commit_date 1762349967 1762349967

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 5 unstable metrics.

See unchanged results
scenario Δ mean agg_http_req_duration_min Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p75 Δ mean agg_http_req_duration_p99 Δ mean throughput
scenario:noprobe unstable
[-16.952µs; +19.877µs] or [-6.074%; +7.122%]
unstable
[-27.156µs; +31.309µs] or [-8.553%; +9.861%]
unstable
[-36.996µs; +42.158µs] or [-11.187%; +12.748%]
unstable
[-142.099µs; +61.104µs] or [-13.747%; +5.911%]
same
scenario:basic same same same unstable
[-226.500µs; -8.890µs] or [-25.732%; -1.010%]
same
scenario:loop unsure
[+0.257µs; +4.484µs] or [+0.003%; +0.051%]
unsure
[-7.436µs; -0.629µs] or [-0.083%; -0.007%]
unsure
[-8.505µs; -0.543µs] or [-0.094%; -0.006%]
same same
Request duration reports for reports
gantt
    title reports - request duration [CI 0.99] : candidate=None, baseline=None
    dateFormat X
    axisFormat %s
section baseline
noprobe (317.508 µs) : 291, 344
.   : milestone, 318,
basic (294.053 µs) : 287, 301
.   : milestone, 294,
loop (8.959 ms) : 8956, 8963
.   : milestone, 8959,
section candidate
noprobe (319.585 µs) : 290, 349
.   : milestone, 320,
basic (293.196 µs) : 286, 300
.   : milestone, 293,
loop (8.955 ms) : 8952, 8958
.   : milestone, 8955,
Loading
  • baseline results
Scenario Request median duration [CI 0.99]
noprobe 317.508 µs [291.339 µs, 343.677 µs]
basic 294.053 µs [286.681 µs, 301.425 µs]
loop 8.959 ms [8.956 ms, 8.963 ms]
  • candidate results
Scenario Request median duration [CI 0.99]
noprobe 319.585 µs [290.19 µs, 348.98 µs]
basic 293.196 µs [286.34 µs, 300.053 µs]
loop 8.955 ms [8.952 ms, 8.958 ms]

@pr-commenter
Copy link

pr-commenter bot commented Nov 3, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/remove-jctools-queues
git_commit_date 1765453400 1765461849
git_commit_sha 015be6d 438a50b
release_version 1.57.0-SNAPSHOT~015be6d1b3 1.57.0-SNAPSHOT~438a50b187
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1765466237 1765466237
ci_job_id 1287534259 1287534259
ci_pipeline_id 86210719 86210719
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-yu74w23f 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-yu74w23f 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None

Summary

Found 1 performance improvements and 1 performance regressions! Performance is the same for 57 metrics, 6 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:petclinic:appsec:Debugger better
[-9.066ms; -6.845ms] or [-13.618%; -10.282%]
58.621ms 66.576ms
scenario:startup:petclinic:appsec:Telemetry worse
[+5.789ms; +6.280ms] or [+63.636%; +69.033%]
15.132ms 9.097ms
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.57.0-SNAPSHOT~438a50b187, baseline=1.57.0-SNAPSHOT~015be6d1b3

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.078 s) : 0, 1077594
Total [baseline] (10.904 s) : 0, 10903955
Agent [candidate] (1.08 s) : 0, 1080092
Total [candidate] (10.825 s) : 0, 10824822
section appsec
Agent [baseline] (1.265 s) : 0, 1264744
Total [baseline] (11.13 s) : 0, 11130052
Agent [candidate] (1.261 s) : 0, 1260598
Total [candidate] (11.014 s) : 0, 11014300
section iast
Agent [baseline] (1.223 s) : 0, 1222540
Total [baseline] (11.173 s) : 0, 11173393
Agent [candidate] (1.218 s) : 0, 1217973
Total [candidate] (11.23 s) : 0, 11229924
section profiling
Agent [baseline] (1.205 s) : 0, 1205411
Total [baseline] (11.099 s) : 0, 11098609
Agent [candidate] (1.204 s) : 0, 1203977
Total [candidate] (10.93 s) : 0, 10930217
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.078 s -
Agent appsec 1.265 s 187.15 ms (17.4%)
Agent iast 1.223 s 144.946 ms (13.5%)
Agent profiling 1.205 s 127.817 ms (11.9%)
Total tracing 10.904 s -
Total appsec 11.13 s 226.097 ms (2.1%)
Total iast 11.173 s 269.438 ms (2.5%)
Total profiling 11.099 s 194.654 ms (1.8%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.08 s -
Agent appsec 1.261 s 180.506 ms (16.7%)
Agent iast 1.218 s 137.881 ms (12.8%)
Agent profiling 1.204 s 123.886 ms (11.5%)
Total tracing 10.825 s -
Total appsec 11.014 s 189.478 ms (1.8%)
Total iast 11.23 s 405.102 ms (3.7%)
Total profiling 10.93 s 105.396 ms (1.0%)
gantt
    title petclinic - break down per module: candidate=1.57.0-SNAPSHOT~438a50b187, baseline=1.57.0-SNAPSHOT~015be6d1b3

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.202 ms) : 0, 1202
crashtracking [candidate] (1.187 ms) : 0, 1187
BytebuddyAgent [baseline] (646.593 ms) : 0, 646593
BytebuddyAgent [candidate] (649.461 ms) : 0, 649461
GlobalTracer [baseline] (281.087 ms) : 0, 281087
GlobalTracer [candidate] (278.588 ms) : 0, 278588
AppSec [baseline] (32.255 ms) : 0, 32255
AppSec [candidate] (32.572 ms) : 0, 32572
Debugger [baseline] (67.799 ms) : 0, 67799
Debugger [candidate] (69.27 ms) : 0, 69270
Remote Config [baseline] (634.214 µs) : 0, 634
Remote Config [candidate] (644.822 µs) : 0, 645
Telemetry [baseline] (8.901 ms) : 0, 8901
Telemetry [candidate] (9.033 ms) : 0, 9033
Flare Poller [baseline] (3.676 ms) : 0, 3676
Flare Poller [candidate] (3.769 ms) : 0, 3769
section appsec
crashtracking [baseline] (1.196 ms) : 0, 1196
crashtracking [candidate] (1.205 ms) : 0, 1205
BytebuddyAgent [baseline] (688.866 ms) : 0, 688866
BytebuddyAgent [candidate] (688.395 ms) : 0, 688395
GlobalTracer [baseline] (259.303 ms) : 0, 259303
GlobalTracer [candidate] (255.621 ms) : 0, 255621
AppSec [baseline] (174.963 ms) : 0, 174963
AppSec [candidate] (175.243 ms) : 0, 175243
Debugger [baseline] (66.576 ms) : 0, 66576
Debugger [candidate] (58.621 ms) : 0, 58621
Remote Config [baseline] (756.674 µs) : 0, 757
Remote Config [candidate] (719.047 µs) : 0, 719
Telemetry [baseline] (9.097 ms) : 0, 9097
Telemetry [candidate] (15.132 ms) : 0, 15132
Flare Poller [baseline] (3.955 ms) : 0, 3955
Flare Poller [candidate] (5.892 ms) : 0, 5892
IAST [baseline] (24.536 ms) : 0, 24536
IAST [candidate] (24.393 ms) : 0, 24393
section iast
crashtracking [baseline] (1.184 ms) : 0, 1184
crashtracking [candidate] (1.188 ms) : 0, 1188
BytebuddyAgent [baseline] (790.39 ms) : 0, 790390
BytebuddyAgent [candidate] (790.457 ms) : 0, 790457
GlobalTracer [baseline] (255.552 ms) : 0, 255552
GlobalTracer [candidate] (251.675 ms) : 0, 251675
AppSec [baseline] (34.483 ms) : 0, 34483
AppSec [candidate] (36.024 ms) : 0, 36024
Debugger [baseline] (66.178 ms) : 0, 66178
Debugger [candidate] (64.171 ms) : 0, 64171
Remote Config [baseline] (532.623 µs) : 0, 533
Remote Config [candidate] (532.859 µs) : 0, 533
Telemetry [baseline] (8.428 ms) : 0, 8428
Telemetry [candidate] (8.415 ms) : 0, 8415
Flare Poller [baseline] (3.531 ms) : 0, 3531
Flare Poller [candidate] (3.648 ms) : 0, 3648
IAST [baseline] (26.873 ms) : 0, 26873
IAST [candidate] (26.731 ms) : 0, 26731
section profiling
ProfilingAgent [baseline] (97.668 ms) : 0, 97668
ProfilingAgent [candidate] (97.765 ms) : 0, 97765
crashtracking [baseline] (1.193 ms) : 0, 1193
crashtracking [candidate] (1.204 ms) : 0, 1204
BytebuddyAgent [baseline] (702.306 ms) : 0, 702306
BytebuddyAgent [candidate] (702.995 ms) : 0, 702995
GlobalTracer [baseline] (220.965 ms) : 0, 220965
GlobalTracer [candidate] (217.399 ms) : 0, 217399
AppSec [baseline] (32.394 ms) : 0, 32394
AppSec [candidate] (32.528 ms) : 0, 32528
Debugger [baseline] (67.89 ms) : 0, 67890
Debugger [candidate] (68.945 ms) : 0, 68945
Remote Config [baseline] (625.544 µs) : 0, 626
Remote Config [candidate] (614.66 µs) : 0, 615
Telemetry [baseline] (8.914 ms) : 0, 8914
Telemetry [candidate] (9.009 ms) : 0, 9009
Flare Poller [baseline] (3.771 ms) : 0, 3771
Flare Poller [candidate] (3.816 ms) : 0, 3816
Profiling [baseline] (98.245 ms) : 0, 98245
Profiling [candidate] (98.347 ms) : 0, 98347
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.57.0-SNAPSHOT~438a50b187, baseline=1.57.0-SNAPSHOT~015be6d1b3

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.092 s) : 0, 1091551
Total [baseline] (8.808 s) : 0, 8808116
Agent [candidate] (1.082 s) : 0, 1082328
Total [candidate] (8.765 s) : 0, 8764922
section iast
Agent [baseline] (1.23 s) : 0, 1230140
Total [baseline] (9.501 s) : 0, 9500835
Agent [candidate] (1.234 s) : 0, 1233834
Total [candidate] (9.413 s) : 0, 9413304
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.092 s -
Agent iast 1.23 s 138.588 ms (12.7%)
Total tracing 8.808 s -
Total iast 9.501 s 692.719 ms (7.9%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.082 s -
Agent iast 1.234 s 151.506 ms (14.0%)
Total tracing 8.765 s -
Total iast 9.413 s 648.381 ms (7.4%)
gantt
    title insecure-bank - break down per module: candidate=1.57.0-SNAPSHOT~438a50b187, baseline=1.57.0-SNAPSHOT~015be6d1b3

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.215 ms) : 0, 1215
crashtracking [candidate] (1.192 ms) : 0, 1192
BytebuddyAgent [baseline] (656.212 ms) : 0, 656212
BytebuddyAgent [candidate] (651.763 ms) : 0, 651763
GlobalTracer [baseline] (284.119 ms) : 0, 284119
GlobalTracer [candidate] (279.764 ms) : 0, 279764
AppSec [baseline] (32.859 ms) : 0, 32859
AppSec [candidate] (32.413 ms) : 0, 32413
Debugger [baseline] (67.775 ms) : 0, 67775
Debugger [candidate] (68.027 ms) : 0, 68027
Remote Config [baseline] (699.724 µs) : 0, 700
Remote Config [candidate] (638.952 µs) : 0, 639
Telemetry [baseline] (9.06 ms) : 0, 9060
Telemetry [candidate] (9.09 ms) : 0, 9090
Flare Poller [baseline] (3.79 ms) : 0, 3790
Flare Poller [candidate] (3.808 ms) : 0, 3808
section iast
crashtracking [baseline] (1.203 ms) : 0, 1203
crashtracking [candidate] (1.208 ms) : 0, 1208
BytebuddyAgent [baseline] (796.186 ms) : 0, 796186
BytebuddyAgent [candidate] (802.234 ms) : 0, 802234
GlobalTracer [baseline] (257.392 ms) : 0, 257392
GlobalTracer [candidate] (255.149 ms) : 0, 255149
AppSec [baseline] (35.54 ms) : 0, 35540
AppSec [candidate] (35.951 ms) : 0, 35951
Debugger [baseline] (64.606 ms) : 0, 64606
Debugger [candidate] (63.783 ms) : 0, 63783
Remote Config [baseline] (561.034 µs) : 0, 561
Remote Config [candidate] (526.472 µs) : 0, 526
Telemetry [baseline] (8.474 ms) : 0, 8474
Telemetry [candidate] (8.354 ms) : 0, 8354
Flare Poller [baseline] (3.498 ms) : 0, 3498
Flare Poller [candidate] (3.641 ms) : 0, 3641
IAST [baseline] (27.08 ms) : 0, 27080
IAST [candidate] (27.328 ms) : 0, 27328
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/remove-jctools-queues
git_commit_date 1765453400 1765461849
git_commit_sha 015be6d 438a50b
release_version 1.57.0-SNAPSHOT~015be6d1b3 1.57.0-SNAPSHOT~438a50b187
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1765466709 1765466709
ci_job_id 1287532927 1287532927
ci_pipeline_id 86210719 86210719
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-isqf0ims 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-isqf0ims 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 2 performance improvements and 0 performance regressions! Performance is the same for 18 metrics, 16 unstable metrics.

scenario Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p95 Δ mean throughput candidate mean agg_http_req_duration_p50 candidate mean agg_http_req_duration_p95 candidate mean throughput baseline mean agg_http_req_duration_p50 baseline mean agg_http_req_duration_p95 baseline mean throughput
scenario:load:insecure-bank:iast_GLOBAL:high_load better
[-185.160µs; -84.002µs] or [-6.217%; -2.820%]
unsure
[-527.430µs; -103.164µs] or [-6.326%; -1.237%]
unstable
[-83.581op/s; +191.206op/s] or [-6.875%; +15.729%]
2.844ms 8.023ms 1269.469op/s 2.978ms 8.338ms 1215.656op/s
scenario:load:petclinic:appsec:high_load better
[-1.932ms; -0.622ms] or [-9.707%; -3.126%]
unsure
[-2.931ms; -0.014ms] or [-9.252%; -0.045%]
unstable
[-3.643op/s; +43.581op/s] or [-1.610%; +19.254%]
18.629ms 30.203ms 246.312op/s 19.906ms 31.675ms 226.344op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.57.0-SNAPSHOT~438a50b187, baseline=1.57.0-SNAPSHOT~015be6d1b3
    dateFormat X
    axisFormat %s
section baseline
no_agent (18.23 ms) : 18046, 18414
.   : milestone, 18230,
appsec (20.626 ms) : 20414, 20838
.   : milestone, 20626,
code_origins (17.61 ms) : 17435, 17785
.   : milestone, 17610,
iast (17.463 ms) : 17293, 17633
.   : milestone, 17463,
profiling (18.782 ms) : 18597, 18966
.   : milestone, 18782,
tracing (18.52 ms) : 18333, 18707
.   : milestone, 18520,
section candidate
no_agent (18.32 ms) : 18131, 18509
.   : milestone, 18320,
appsec (18.947 ms) : 18754, 19141
.   : milestone, 18947,
code_origins (17.302 ms) : 17131, 17473
.   : milestone, 17302,
iast (17.647 ms) : 17473, 17821
.   : milestone, 17647,
profiling (18.787 ms) : 18603, 18971
.   : milestone, 18787,
tracing (17.604 ms) : 17429, 17779
.   : milestone, 17604,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 18.23 ms [18.046 ms, 18.414 ms] -
appsec 20.626 ms [20.414 ms, 20.838 ms] 2.396 ms (13.1%)
code_origins 17.61 ms [17.435 ms, 17.785 ms] -619.512 µs (-3.4%)
iast 17.463 ms [17.293 ms, 17.633 ms] -766.537 µs (-4.2%)
profiling 18.782 ms [18.597 ms, 18.966 ms] 551.813 µs (3.0%)
tracing 18.52 ms [18.333 ms, 18.707 ms] 290.338 µs (1.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 18.32 ms [18.131 ms, 18.509 ms] -
appsec 18.947 ms [18.754 ms, 19.141 ms] 627.277 µs (3.4%)
code_origins 17.302 ms [17.131 ms, 17.473 ms] -1.018 ms (-5.6%)
iast 17.647 ms [17.473 ms, 17.821 ms] -672.928 µs (-3.7%)
profiling 18.787 ms [18.603 ms, 18.971 ms] 466.79 µs (2.5%)
tracing 17.604 ms [17.429 ms, 17.779 ms] -715.944 µs (-3.9%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.57.0-SNAPSHOT~438a50b187, baseline=1.57.0-SNAPSHOT~015be6d1b3
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.206 ms) : 1194, 1217
.   : milestone, 1206,
iast (3.196 ms) : 3150, 3242
.   : milestone, 3196,
iast_FULL (5.801 ms) : 5744, 5858
.   : milestone, 5801,
iast_GLOBAL (3.775 ms) : 3710, 3841
.   : milestone, 3775,
profiling (2.03 ms) : 2012, 2048
.   : milestone, 2030,
tracing (1.86 ms) : 1844, 1877
.   : milestone, 1860,
section candidate
no_agent (1.206 ms) : 1194, 1218
.   : milestone, 1206,
iast (3.131 ms) : 3093, 3168
.   : milestone, 3131,
iast_FULL (5.74 ms) : 5684, 5796
.   : milestone, 5740,
iast_GLOBAL (3.612 ms) : 3556, 3669
.   : milestone, 3612,
profiling (1.904 ms) : 1889, 1919
.   : milestone, 1904,
tracing (1.852 ms) : 1836, 1868
.   : milestone, 1852,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.206 ms [1.194 ms, 1.217 ms] -
iast 3.196 ms [3.15 ms, 3.242 ms] 1.99 ms (165.1%)
iast_FULL 5.801 ms [5.744 ms, 5.858 ms] 4.596 ms (381.2%)
iast_GLOBAL 3.775 ms [3.71 ms, 3.841 ms] 2.57 ms (213.1%)
profiling 2.03 ms [2.012 ms, 2.048 ms] 824.486 µs (68.4%)
tracing 1.86 ms [1.844 ms, 1.877 ms] 654.754 µs (54.3%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.206 ms [1.194 ms, 1.218 ms] -
iast 3.131 ms [3.093 ms, 3.168 ms] 1.925 ms (159.6%)
iast_FULL 5.74 ms [5.684 ms, 5.796 ms] 4.534 ms (376.0%)
iast_GLOBAL 3.612 ms [3.556 ms, 3.669 ms] 2.406 ms (199.5%)
profiling 1.904 ms [1.889 ms, 1.919 ms] 698.084 µs (57.9%)
tracing 1.852 ms [1.836 ms, 1.868 ms] 645.925 µs (53.6%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/remove-jctools-queues
git_commit_date 1765453400 1765461849
git_commit_sha 015be6d 438a50b
release_version 1.57.0-SNAPSHOT~015be6d1b3 1.57.0-SNAPSHOT~438a50b187
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1765463844 1765463844
ci_job_id 1287334660 1287334660
ci_pipeline_id 86210719 86210719
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-osdjmxzz 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-osdjmxzz 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics.

Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.57.0-SNAPSHOT~438a50b187, baseline=1.57.0-SNAPSHOT~015be6d1b3
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.007 s) : 15007000, 15007000
.   : milestone, 15007000,
appsec (14.404 s) : 14404000, 14404000
.   : milestone, 14404000,
iast (18.437 s) : 18437000, 18437000
.   : milestone, 18437000,
iast_GLOBAL (17.796 s) : 17796000, 17796000
.   : milestone, 17796000,
profiling (14.391 s) : 14391000, 14391000
.   : milestone, 14391000,
tracing (14.703 s) : 14703000, 14703000
.   : milestone, 14703000,
section candidate
no_agent (15.387 s) : 15387000, 15387000
.   : milestone, 15387000,
appsec (14.594 s) : 14594000, 14594000
.   : milestone, 14594000,
iast (18.31 s) : 18310000, 18310000
.   : milestone, 18310000,
iast_GLOBAL (17.962 s) : 17962000, 17962000
.   : milestone, 17962000,
profiling (15.289 s) : 15289000, 15289000
.   : milestone, 15289000,
tracing (14.763 s) : 14763000, 14763000
.   : milestone, 14763000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.007 s [15.007 s, 15.007 s] -
appsec 14.404 s [14.404 s, 14.404 s] -603.0 ms (-4.0%)
iast 18.437 s [18.437 s, 18.437 s] 3.43 s (22.9%)
iast_GLOBAL 17.796 s [17.796 s, 17.796 s] 2.789 s (18.6%)
profiling 14.391 s [14.391 s, 14.391 s] -616.0 ms (-4.1%)
tracing 14.703 s [14.703 s, 14.703 s] -304.0 ms (-2.0%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.387 s [15.387 s, 15.387 s] -
appsec 14.594 s [14.594 s, 14.594 s] -793.0 ms (-5.2%)
iast 18.31 s [18.31 s, 18.31 s] 2.923 s (19.0%)
iast_GLOBAL 17.962 s [17.962 s, 17.962 s] 2.575 s (16.7%)
profiling 15.289 s [15.289 s, 15.289 s] -98.0 ms (-0.6%)
tracing 14.763 s [14.763 s, 14.763 s] -624.0 ms (-4.1%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.57.0-SNAPSHOT~438a50b187, baseline=1.57.0-SNAPSHOT~015be6d1b3
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.475 ms) : 1464, 1487
.   : milestone, 1475,
appsec (2.455 ms) : 2404, 2507
.   : milestone, 2455,
iast (2.215 ms) : 2151, 2279
.   : milestone, 2215,
iast_GLOBAL (2.26 ms) : 2195, 2325
.   : milestone, 2260,
profiling (2.072 ms) : 2020, 2125
.   : milestone, 2072,
tracing (2.052 ms) : 2001, 2102
.   : milestone, 2052,
section candidate
no_agent (1.479 ms) : 1467, 1490
.   : milestone, 1479,
appsec (2.519 ms) : 2464, 2573
.   : milestone, 2519,
iast (2.218 ms) : 2154, 2283
.   : milestone, 2218,
iast_GLOBAL (2.249 ms) : 2184, 2314
.   : milestone, 2249,
profiling (2.075 ms) : 2022, 2127
.   : milestone, 2075,
tracing (2.053 ms) : 2002, 2103
.   : milestone, 2053,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.475 ms [1.464 ms, 1.487 ms] -
appsec 2.455 ms [2.404 ms, 2.507 ms] 979.957 µs (66.4%)
iast 2.215 ms [2.151 ms, 2.279 ms] 739.891 µs (50.2%)
iast_GLOBAL 2.26 ms [2.195 ms, 2.325 ms] 785.155 µs (53.2%)
profiling 2.072 ms [2.02 ms, 2.125 ms] 597.094 µs (40.5%)
tracing 2.052 ms [2.001 ms, 2.102 ms] 576.485 µs (39.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.479 ms [1.467 ms, 1.49 ms] -
appsec 2.519 ms [2.464 ms, 2.573 ms] 1.04 ms (70.3%)
iast 2.218 ms [2.154 ms, 2.283 ms] 739.468 µs (50.0%)
iast_GLOBAL 2.249 ms [2.184 ms, 2.314 ms] 770.279 µs (52.1%)
profiling 2.075 ms [2.022 ms, 2.127 ms] 595.784 µs (40.3%)
tracing 2.053 ms [2.002 ms, 2.103 ms] 573.59 µs (38.8%)

@amarziali amarziali force-pushed the andrea.marziali/remove-jctools-queues branch 6 times, most recently from 229f67a to 374d13d Compare November 7, 2025 14:59
@amarziali amarziali changed the title Removes jctools usage for lock-free queues. Replace JCTools queues with VarHandle-based implementations for Java 9+ Nov 10, 2025
@amarziali amarziali force-pushed the andrea.marziali/remove-jctools-queues branch 2 times, most recently from 21e0a65 to 259eeb5 Compare November 10, 2025 15:25
@amarziali amarziali marked this pull request as ready for review November 10, 2025 16:20
@amarziali amarziali requested review from a team as code owners November 10, 2025 16:20
@amarziali amarziali requested a review from mcculls November 10, 2025 16:20
@github-actions
Copy link
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@amarziali amarziali requested a review from dougqh November 10, 2025 16:20
@amarziali amarziali added type: enhancement Enhancements and improvements comp: core Tracer core labels Nov 10, 2025
@amarziali amarziali force-pushed the andrea.marziali/remove-jctools-queues branch from 9e7acbe to b2850b3 Compare November 12, 2025 09:01
@franz1981
Copy link

Hi @amarziali I am one of the developers of JCTools and we are super happy if we could bring a var handle generation variant in our lib as well.
I can see the value and faster feedback/different ownership of having a stripped version of our dependency (which can still be obtain via shading actually...), but I believe would be a great community value if we could join efforts...plus, we love contributions ☺️

Note: JCTools is at the very core of other frameworks which will soon hit the "no unsafe world" JVM barrier, including Netty.
I'm recently working hard to improve it re this aspect, and JCtools is one of the key but missing pieces there too.
Which means that contributing to JCTools would bring an enormous value to Netty and to many others very impactful projects as well
🙏

@amarziali amarziali force-pushed the andrea.marziali/remove-jctools-queues branch 3 times, most recently from 85b0dcd to fc49419 Compare November 17, 2025 12:28
@amarziali amarziali force-pushed the andrea.marziali/remove-jctools-queues branch from fc49419 to 183fc37 Compare November 19, 2025 17:27
@amarziali amarziali force-pushed the andrea.marziali/remove-jctools-queues branch from 38d8e7f to 438a50b Compare December 11, 2025 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: core Tracer core type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants