Virtual vs platform performance at 10K HTTP requests

David david.vlijmincx at gmail.com
Tue Nov 25 20:41:05 UTC 2025


Hi,

I’m seeing some strange behaviour with virtual threads on JDK 25, and I’m
hoping someone here can point me in the right direction.

I’m running a benchmark comparing virtual threads and platform threads.
When issuing 10K HTTP requests, the virtual thread version consistently
stops making progress at around ~8100 requests. After that point, it only
makes small bursts of 100 to 1000 additional requests occasionally. This
happens with every iteration of the benchmark. CPU usage reflects this:
during the virtual thread benchmark all cores stay mostly idle (1–2%). The
platform thread version, on the other hand, completes 100K+ requests
without issues. I can reproduce this on macOS and Linux using both JDK 24
and 25.

The code I’m using: https://github.com/davidtos/Loom_REST_benchmark

Maybe I’m missing something obvious, but I can’t explain this behaviour. My
current hypothesis is that issuing 10K concurrent requests causes something
(HTTP client, networking, or scheduler) to saturate differently under
virtual threads but that doesn’t fully explain the periodic request bursts.

Hope someone can help me out.

Thanks in advance!

Kind regards,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20251125/1c8acb72/attachment.htm>


More information about the loom-dev mailing list