Segments Account · Quarkus Native (G1GC) · follow-up to jvm-native-rust · 18 Oct 2026

Optimizing Quarkus Native to Close the Rust Gap

The Rust port roughly halved CPU per request and doubled HTTP throughput versus Oracle native. This checklist is for the agent running the tests: verify each item on the current Quarkus native build in e1, measure before and after, and report numbers in the same format as the jvm-native-rust report.

Checklist

1 Virtual threads for HTTP

Verify

Confirm whether Quarkus HTTP request handling uses virtual threads (JDK 21+) or a fixed platform thread pool. Check quarkus.http.so-reuse-port / executor config, thread dump under load, and /q/metrics or actuator endpoints if exposed.

  • If platform threads: switch to virtual threads and re-run the HTTP load test.
  • Measure: max HTTP rps, p99, CPU per 1,000 rps, before vs after.
Status: not started

2 gRPC thread pool size

Verify

The jvm-native-rust report noted the JVM gRPC thread pool (30 threads) exhausted around 1.6 cores at ~1,683 rps. Native may inherit a similar pool. Check the gRPC executor configuration and bump it or route gRPC through the virtual-thread executor.

  • Measure: gRPC max rps and p99 at 2,000 rps before vs after.
Status: not started

3 Allocation pressure in the hot path

Verify

At 6,000 rps even small per-request allocations matter. Profile with GraalVM Native Image's built-in allocation sampling or async-profiler.

  • Look for per-request object creation: DTOs, string concatenation, log message building.
  • Reuse buffers, avoid string building in disabled log paths, pool hot objects.
  • Measure: allocations per request and GC CPU % before vs after.
Status: not started

4 GC tuning (G1, no stop-the-world claim)

Measure

G1GC is already in use with ~1% of one CPU and 1–2 ms pauses. Still worth confirming pause distribution and frequency under the new higher load from items 1–3.

  • Track: pause count, max pause, GC CPU % at 2,000 and 4,000 HTTP rps.
Status: not started

5 Connection pooling for DynamoDB

Verify

If each request opens or borrows connections expensively, pooling matters at high concurrency. Check the AWS SDK client config: max connections, acquire timeout, and whether HTTP/2 is enabled.

  • Measure: connection acquire latency and pool exhaustion events under load.
Status: not started

6 Netty / event-loop utilization

Measure

Quarkus on native uses Netty. Check whether the event loop is the bottleneck versus worker threads — CPU profile should show where time goes when HTTP rps plateaus.

  • Measure: event-loop busy % vs worker busy % at plateau.
Status: not started

7 Full same-time three-way re-run

Measure

After applying changes, re-run JVM, Oracle native, and Rust side by side on 2-CPU pods exactly as on 18 Oct, with identical load generators and the same 1,000 compared calls for response equality.

  • Report the same table: gRPC/HTTP max rps, CPU per 1,000 rps, p99, memory, start-to-ready time.
Status: not started

Context: Rust port did the same work (DynamoDB reads, segments-admin cache, Univex evaluation, metrics) and returned identical responses. Fairness notes from that run still apply. This checklist targets only the Quarkus native side.