Virtual vs platform performance at 10K HTTP requests
Robert Engels
robaho at me.com
Wed Nov 26 00:25:59 UTC 2025
Your platform test is limiting to at most 4 outstanding requests.
The virtual thread one is uncapped so you have probably hosed the server and it can’t respond, or you’ve run out of memory, or connections, …. lots of possibilities….
> On Nov 25, 2025, at 2:41 PM, David <david.vlijmincx at gmail.com> wrote:
>
> 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/086760ae/attachment.htm>
More information about the loom-dev
mailing list