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 1767584260 1767600171
git_commit_sha b4a047e 44fc5da
release_version 1.58.0-SNAPSHOT~b4a047ea27 1.57.0-SNAPSHOT~44fc5dac2b
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1767602035 1767602035
ci_job_id 1325680763 1325680763
ci_pipeline_id 88856779 88856779
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-n9rq8wc3 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-n9rq8wc3 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 0 performance improvements and 0 performance regressions! Performance is the same for 56 metrics, 9 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.57.0-SNAPSHOT~44fc5dac2b, baseline=1.58.0-SNAPSHOT~b4a047ea27

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.089 s) : 0, 1088697
Total [baseline] (10.966 s) : 0, 10965523
Agent [candidate] (1.095 s) : 0, 1095206
Total [candidate] (10.973 s) : 0, 10973014
section appsec
Agent [baseline] (1.264 s) : 0, 1264253
Total [baseline] (10.952 s) : 0, 10951867
Agent [candidate] (1.26 s) : 0, 1259682
Total [candidate] (10.983 s) : 0, 10982891
section iast
Agent [baseline] (1.232 s) : 0, 1232252
Total [baseline] (11.158 s) : 0, 11157815
Agent [candidate] (1.221 s) : 0, 1221036
Total [candidate] (11.131 s) : 0, 11130997
section profiling
Agent [baseline] (1.213 s) : 0, 1213326
Total [baseline] (10.925 s) : 0, 10925302
Agent [candidate] (1.203 s) : 0, 1203467
Total [candidate] (10.906 s) : 0, 10905786
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.089 s -
Agent appsec 1.264 s 175.556 ms (16.1%)
Agent iast 1.232 s 143.555 ms (13.2%)
Agent profiling 1.213 s 124.629 ms (11.4%)
Total tracing 10.966 s -
Total appsec 10.952 s -13.656 ms (-0.1%)
Total iast 11.158 s 192.292 ms (1.8%)
Total profiling 10.925 s -40.221 ms (-0.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.095 s -
Agent appsec 1.26 s 164.476 ms (15.0%)
Agent iast 1.221 s 125.831 ms (11.5%)
Agent profiling 1.203 s 108.262 ms (9.9%)
Total tracing 10.973 s -
Total appsec 10.983 s 9.877 ms (0.1%)
Total iast 11.131 s 157.983 ms (1.4%)
Total profiling 10.906 s -67.228 ms (-0.6%)
gantt
    title petclinic - break down per module: candidate=1.57.0-SNAPSHOT~44fc5dac2b, baseline=1.58.0-SNAPSHOT~b4a047ea27

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.195 ms) : 0, 1195
crashtracking [candidate] (1.192 ms) : 0, 1192
BytebuddyAgent [baseline] (653.202 ms) : 0, 653202
BytebuddyAgent [candidate] (659.819 ms) : 0, 659819
GlobalTracer [baseline] (283.351 ms) : 0, 283351
GlobalTracer [candidate] (282.115 ms) : 0, 282115
AppSec [baseline] (32.664 ms) : 0, 32664
AppSec [candidate] (33.294 ms) : 0, 33294
Debugger [baseline] (68.991 ms) : 0, 68991
Debugger [candidate] (69.374 ms) : 0, 69374
Remote Config [baseline] (635.265 µs) : 0, 635
Remote Config [candidate] (629.804 µs) : 0, 630
Telemetry [baseline] (9.198 ms) : 0, 9198
Telemetry [candidate] (9.183 ms) : 0, 9183
Flare Poller [baseline] (3.793 ms) : 0, 3793
Flare Poller [candidate] (3.791 ms) : 0, 3791
section appsec
crashtracking [baseline] (1.17 ms) : 0, 1170
crashtracking [candidate] (1.178 ms) : 0, 1178
BytebuddyAgent [baseline] (690.386 ms) : 0, 690386
BytebuddyAgent [candidate] (690.554 ms) : 0, 690554
GlobalTracer [baseline] (258.211 ms) : 0, 258211
GlobalTracer [candidate] (253.634 ms) : 0, 253634
IAST [baseline] (24.589 ms) : 0, 24589
IAST [candidate] (24.365 ms) : 0, 24365
AppSec [baseline] (173.126 ms) : 0, 173126
AppSec [candidate] (174.209 ms) : 0, 174209
Debugger [baseline] (67.325 ms) : 0, 67325
Debugger [candidate] (65.092 ms) : 0, 65092
Remote Config [baseline] (824.503 µs) : 0, 825
Remote Config [candidate] (797.586 µs) : 0, 798
Telemetry [baseline] (9.562 ms) : 0, 9562
Telemetry [candidate] (10.956 ms) : 0, 10956
Flare Poller [baseline] (3.767 ms) : 0, 3767
Flare Poller [candidate] (3.662 ms) : 0, 3662
section iast
crashtracking [baseline] (1.193 ms) : 0, 1193
crashtracking [candidate] (1.175 ms) : 0, 1175
BytebuddyAgent [baseline] (797.824 ms) : 0, 797824
BytebuddyAgent [candidate] (791.861 ms) : 0, 791861
GlobalTracer [baseline] (257.522 ms) : 0, 257522
GlobalTracer [candidate] (252.617 ms) : 0, 252617
IAST [baseline] (27.165 ms) : 0, 27165
IAST [candidate] (26.913 ms) : 0, 26913
AppSec [baseline] (34.858 ms) : 0, 34858
AppSec [candidate] (35.613 ms) : 0, 35613
Debugger [baseline] (65.447 ms) : 0, 65447
Debugger [candidate] (64.788 ms) : 0, 64788
Remote Config [baseline] (622.351 µs) : 0, 622
Remote Config [candidate] (615.507 µs) : 0, 616
Telemetry [baseline] (8.566 ms) : 0, 8566
Telemetry [candidate] (8.477 ms) : 0, 8477
Flare Poller [baseline] (3.585 ms) : 0, 3585
Flare Poller [candidate] (3.529 ms) : 0, 3529
section profiling
crashtracking [baseline] (1.225 ms) : 0, 1225
crashtracking [candidate] (1.212 ms) : 0, 1212
BytebuddyAgent [baseline] (709.186 ms) : 0, 709186
BytebuddyAgent [candidate] (704.643 ms) : 0, 704643
GlobalTracer [baseline] (222.117 ms) : 0, 222117
GlobalTracer [candidate] (216.816 ms) : 0, 216816
AppSec [baseline] (32.566 ms) : 0, 32566
AppSec [candidate] (32.457 ms) : 0, 32457
Debugger [baseline] (68.394 ms) : 0, 68394
Debugger [candidate] (68.236 ms) : 0, 68236
Remote Config [baseline] (630.917 µs) : 0, 631
Remote Config [candidate] (633.964 µs) : 0, 634
Telemetry [baseline] (8.75 ms) : 0, 8750
Telemetry [candidate] (8.79 ms) : 0, 8790
Flare Poller [baseline] (3.671 ms) : 0, 3671
Flare Poller [candidate] (3.686 ms) : 0, 3686
ProfilingAgent [baseline] (96.621 ms) : 0, 96621
ProfilingAgent [candidate] (97.127 ms) : 0, 97127
Profiling [baseline] (97.205 ms) : 0, 97205
Profiling [candidate] (97.713 ms) : 0, 97713
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.57.0-SNAPSHOT~44fc5dac2b, baseline=1.58.0-SNAPSHOT~b4a047ea27

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.091 s) : 0, 1091489
Total [baseline] (8.77 s) : 0, 8770087
Agent [candidate] (1.08 s) : 0, 1080483
Total [candidate] (8.732 s) : 0, 8732330
section iast
Agent [baseline] (1.229 s) : 0, 1229186
Total [baseline] (9.348 s) : 0, 9348018
Agent [candidate] (1.216 s) : 0, 1215943
Total [candidate] (9.291 s) : 0, 9290782
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.091 s -
Agent iast 1.229 s 137.697 ms (12.6%)
Total tracing 8.77 s -
Total iast 9.348 s 577.931 ms (6.6%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.08 s -
Agent iast 1.216 s 135.46 ms (12.5%)
Total tracing 8.732 s -
Total iast 9.291 s 558.452 ms (6.4%)
gantt
    title insecure-bank - break down per module: candidate=1.57.0-SNAPSHOT~44fc5dac2b, baseline=1.58.0-SNAPSHOT~b4a047ea27

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.192 ms) : 0, 1192
crashtracking [candidate] (1.187 ms) : 0, 1187
BytebuddyAgent [baseline] (656.373 ms) : 0, 656373
BytebuddyAgent [candidate] (650.873 ms) : 0, 650873
GlobalTracer [baseline] (284.371 ms) : 0, 284371
GlobalTracer [candidate] (278.91 ms) : 0, 278910
AppSec [baseline] (32.864 ms) : 0, 32864
AppSec [candidate] (32.687 ms) : 0, 32687
Debugger [baseline] (67.545 ms) : 0, 67545
Debugger [candidate] (66.092 ms) : 0, 66092
Remote Config [baseline] (614.553 µs) : 0, 615
Remote Config [candidate] (615.63 µs) : 0, 616
Telemetry [baseline] (9.08 ms) : 0, 9080
Telemetry [candidate] (10.719 ms) : 0, 10719
Flare Poller [baseline] (3.781 ms) : 0, 3781
Flare Poller [candidate] (3.831 ms) : 0, 3831
section iast
crashtracking [baseline] (1.209 ms) : 0, 1209
crashtracking [candidate] (1.188 ms) : 0, 1188
BytebuddyAgent [baseline] (795.944 ms) : 0, 795944
BytebuddyAgent [candidate] (789.387 ms) : 0, 789387
GlobalTracer [baseline] (256.904 ms) : 0, 256904
GlobalTracer [candidate] (251.419 ms) : 0, 251419
IAST [baseline] (27.314 ms) : 0, 27314
IAST [candidate] (26.767 ms) : 0, 26767
AppSec [baseline] (32.753 ms) : 0, 32753
AppSec [candidate] (35.441 ms) : 0, 35441
Debugger [baseline] (66.875 ms) : 0, 66875
Debugger [candidate] (63.886 ms) : 0, 63886
Remote Config [baseline] (587.583 µs) : 0, 588
Remote Config [candidate] (579.568 µs) : 0, 580
Telemetry [baseline] (8.507 ms) : 0, 8507
Telemetry [candidate] (8.498 ms) : 0, 8498
Flare Poller [baseline] (3.585 ms) : 0, 3585
Flare Poller [candidate] (3.513 ms) : 0, 3513
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/remove-jctools-queues
git_commit_date 1767584260 1767600171
git_commit_sha b4a047e 44fc5da
release_version 1.58.0-SNAPSHOT~b4a047ea27 1.57.0-SNAPSHOT~44fc5dac2b
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1767625477 1767625477
ci_job_id 1326685088 1326685088
ci_pipeline_id 88856779 88856779
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-wjrsmbf3 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-wjrsmbf3 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 3 performance improvements and 0 performance regressions! Performance is the same for 17 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:high_load unsure
[-137.229µs; -34.576µs] or [-5.551%; -1.399%]
better
[-691.125µs; -164.732µs] or [-9.418%; -2.245%]
unstable
[-102.236op/s; +225.611op/s] or [-7.107%; +15.684%]
2.386ms 6.911ms 1500.188op/s 2.472ms 7.339ms 1438.500op/s
scenario:load:petclinic:profiling:high_load better
[-1.840ms; -0.881ms] or [-9.516%; -4.555%]
unsure
[-1.849ms; -0.587ms] or [-6.008%; -1.908%]
unstable
[-9.827op/s; +38.952op/s] or [-4.120%; +16.330%]
17.973ms 29.561ms 253.094op/s 19.333ms 30.779ms 238.531op/s
scenario:load:petclinic:no_agent:high_load better
[-2.690ms; -1.341ms] or [-14.445%; -7.201%]
unstable
[-4.249ms; -0.924ms] or [-13.735%; -2.988%]
unstable
[+0.520op/s; +55.543op/s] or [+0.213%; +22.708%]
16.604ms 28.348ms 272.625op/s 18.619ms 30.934ms 244.594op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.57.0-SNAPSHOT~44fc5dac2b, baseline=1.58.0-SNAPSHOT~b4a047ea27
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.237 ms) : 1225, 1249
.   : milestone, 1237,
iast (3.179 ms) : 3142, 3215
.   : milestone, 3179,
iast_FULL (5.839 ms) : 5780, 5898
.   : milestone, 5839,
iast_GLOBAL (3.57 ms) : 3515, 3626
.   : milestone, 3570,
profiling (2.053 ms) : 2034, 2073
.   : milestone, 2053,
tracing (1.764 ms) : 1750, 1779
.   : milestone, 1764,
section candidate
no_agent (1.189 ms) : 1178, 1201
.   : milestone, 1189,
iast (3.045 ms) : 3012, 3079
.   : milestone, 3045,
iast_FULL (5.709 ms) : 5652, 5765
.   : milestone, 5709,
iast_GLOBAL (3.503 ms) : 3445, 3562
.   : milestone, 3503,
profiling (2.016 ms) : 1998, 2034
.   : milestone, 2016,
tracing (1.79 ms) : 1774, 1805
.   : milestone, 1790,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.237 ms [1.225 ms, 1.249 ms] -
iast 3.179 ms [3.142 ms, 3.215 ms] 1.942 ms (157.0%)
iast_FULL 5.839 ms [5.78 ms, 5.898 ms] 4.603 ms (372.2%)
iast_GLOBAL 3.57 ms [3.515 ms, 3.626 ms] 2.334 ms (188.7%)
profiling 2.053 ms [2.034 ms, 2.073 ms] 816.706 µs (66.0%)
tracing 1.764 ms [1.75 ms, 1.779 ms] 527.423 µs (42.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.189 ms [1.178 ms, 1.201 ms] -
iast 3.045 ms [3.012 ms, 3.079 ms] 1.856 ms (156.1%)
iast_FULL 5.709 ms [5.652 ms, 5.765 ms] 4.519 ms (380.0%)
iast_GLOBAL 3.503 ms [3.445 ms, 3.562 ms] 2.314 ms (194.6%)
profiling 2.016 ms [1.998 ms, 2.034 ms] 826.849 µs (69.5%)
tracing 1.79 ms [1.774 ms, 1.805 ms] 600.606 µs (50.5%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.57.0-SNAPSHOT~44fc5dac2b, baseline=1.58.0-SNAPSHOT~b4a047ea27
    dateFormat X
    axisFormat %s
section baseline
no_agent (19.084 ms) : 18887, 19281
.   : milestone, 19084,
appsec (18.812 ms) : 18619, 19005
.   : milestone, 18812,
code_origins (17.78 ms) : 17605, 17955
.   : milestone, 17780,
iast (17.588 ms) : 17411, 17765
.   : milestone, 17588,
profiling (19.57 ms) : 19373, 19766
.   : milestone, 19570,
tracing (17.982 ms) : 17799, 18165
.   : milestone, 17982,
section candidate
no_agent (17.112 ms) : 16940, 17283
.   : milestone, 17112,
appsec (18.503 ms) : 18314, 18693
.   : milestone, 18503,
code_origins (17.817 ms) : 17640, 17994
.   : milestone, 17817,
iast (17.565 ms) : 17390, 17741
.   : milestone, 17565,
profiling (18.44 ms) : 18257, 18623
.   : milestone, 18440,
tracing (17.486 ms) : 17312, 17660
.   : milestone, 17486,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 19.084 ms [18.887 ms, 19.281 ms] -
appsec 18.812 ms [18.619 ms, 19.005 ms] -271.995 µs (-1.4%)
code_origins 17.78 ms [17.605 ms, 17.955 ms] -1.304 ms (-6.8%)
iast 17.588 ms [17.411 ms, 17.765 ms] -1.496 ms (-7.8%)
profiling 19.57 ms [19.373 ms, 19.766 ms] 485.698 µs (2.5%)
tracing 17.982 ms [17.799 ms, 18.165 ms] -1.102 ms (-5.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 17.112 ms [16.94 ms, 17.283 ms] -
appsec 18.503 ms [18.314 ms, 18.693 ms] 1.392 ms (8.1%)
code_origins 17.817 ms [17.64 ms, 17.994 ms] 705.42 µs (4.1%)
iast 17.565 ms [17.39 ms, 17.741 ms] 453.776 µs (2.7%)
profiling 18.44 ms [18.257 ms, 18.623 ms] 1.329 ms (7.8%)
tracing 17.486 ms [17.312 ms, 17.66 ms] 374.172 µs (2.2%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/remove-jctools-queues
git_commit_date 1767584260 1767600171
git_commit_sha b4a047e 44fc5da
release_version 1.58.0-SNAPSHOT~b4a047ea27 1.57.0-SNAPSHOT~44fc5dac2b
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1767602270 1767602270
ci_job_id 1325680765 1325680765
ci_pipeline_id 88856779 88856779
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-h8qwro6q 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-h8qwro6q 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 11 metrics, 1 unstable metrics.

Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.57.0-SNAPSHOT~44fc5dac2b, baseline=1.58.0-SNAPSHOT~b4a047ea27
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.48 ms) : 1469, 1492
.   : milestone, 1480,
appsec (3.661 ms) : 3446, 3877
.   : milestone, 3661,
iast (2.216 ms) : 2152, 2280
.   : milestone, 2216,
iast_GLOBAL (2.257 ms) : 2191, 2323
.   : milestone, 2257,
profiling (2.058 ms) : 2006, 2111
.   : milestone, 2058,
tracing (2.045 ms) : 1994, 2096
.   : milestone, 2045,
section candidate
no_agent (1.475 ms) : 1464, 1487
.   : milestone, 1475,
appsec (3.657 ms) : 3443, 3871
.   : milestone, 3657,
iast (2.205 ms) : 2140, 2269
.   : milestone, 2205,
iast_GLOBAL (2.255 ms) : 2190, 2320
.   : milestone, 2255,
profiling (2.102 ms) : 2047, 2156
.   : milestone, 2102,
tracing (2.05 ms) : 1999, 2101
.   : milestone, 2050,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.48 ms [1.469 ms, 1.492 ms] -
appsec 3.661 ms [3.446 ms, 3.877 ms] 2.181 ms (147.3%)
iast 2.216 ms [2.152 ms, 2.28 ms] 735.563 µs (49.7%)
iast_GLOBAL 2.257 ms [2.191 ms, 2.323 ms] 776.476 µs (52.5%)
profiling 2.058 ms [2.006 ms, 2.111 ms] 578.04 µs (39.0%)
tracing 2.045 ms [1.994 ms, 2.096 ms] 565.048 µs (38.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.475 ms [1.464 ms, 1.487 ms] -
appsec 3.657 ms [3.443 ms, 3.871 ms] 2.182 ms (147.9%)
iast 2.205 ms [2.14 ms, 2.269 ms] 729.24 µs (49.4%)
iast_GLOBAL 2.255 ms [2.19 ms, 2.32 ms] 779.47 µs (52.8%)
profiling 2.102 ms [2.047 ms, 2.156 ms] 626.226 µs (42.4%)
tracing 2.05 ms [1.999 ms, 2.101 ms] 574.721 µs (39.0%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.57.0-SNAPSHOT~44fc5dac2b, baseline=1.58.0-SNAPSHOT~b4a047ea27
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.96 s) : 14960000, 14960000
.   : milestone, 14960000,
appsec (14.618 s) : 14618000, 14618000
.   : milestone, 14618000,
iast (17.938 s) : 17938000, 17938000
.   : milestone, 17938000,
iast_GLOBAL (17.961 s) : 17961000, 17961000
.   : milestone, 17961000,
profiling (14.792 s) : 14792000, 14792000
.   : milestone, 14792000,
tracing (14.426 s) : 14426000, 14426000
.   : milestone, 14426000,
section candidate
no_agent (15.512 s) : 15512000, 15512000
.   : milestone, 15512000,
appsec (14.397 s) : 14397000, 14397000
.   : milestone, 14397000,
iast (18.269 s) : 18269000, 18269000
.   : milestone, 18269000,
iast_GLOBAL (17.884 s) : 17884000, 17884000
.   : milestone, 17884000,
profiling (14.614 s) : 14614000, 14614000
.   : milestone, 14614000,
tracing (14.683 s) : 14683000, 14683000
.   : milestone, 14683000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.96 s [14.96 s, 14.96 s] -
appsec 14.618 s [14.618 s, 14.618 s] -342.0 ms (-2.3%)
iast 17.938 s [17.938 s, 17.938 s] 2.978 s (19.9%)
iast_GLOBAL 17.961 s [17.961 s, 17.961 s] 3.001 s (20.1%)
profiling 14.792 s [14.792 s, 14.792 s] -168.0 ms (-1.1%)
tracing 14.426 s [14.426 s, 14.426 s] -534.0 ms (-3.6%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.512 s [15.512 s, 15.512 s] -
appsec 14.397 s [14.397 s, 14.397 s] -1.115 s (-7.2%)
iast 18.269 s [18.269 s, 18.269 s] 2.757 s (17.8%)
iast_GLOBAL 17.884 s [17.884 s, 17.884 s] 2.372 s (15.3%)
profiling 14.614 s [14.614 s, 14.614 s] -898.0 ms (-5.8%)
tracing 14.683 s [14.683 s, 14.683 s] -829.0 ms (-5.3%)

@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