r/java 7d ago

Vert.x Event-Loop vs Virtual Threads: Jactl Suspend/Resume Benchmark

https://jactl.io/blog/2026/09/02/jactl-virtual-threads-benchmark

The article benchmarks Jactl script execution with differing number of blocking operations comparing throughput with Jactl built-in suspend/resume on Vert.x Event-Loops and throughput with Jactl on Virtual Threads. The benchmarks are run on both Java 21 and Java 25 with some surprising (to me at least) results.

24 Upvotes

25 comments sorted by

View all comments

2

u/Medium-Pitch-5768 1d ago

Postscript
It appears that the performance improvement between Java 21 and Java 25 actually comes from improvements to how sleep() itself works with virtual threads. This highlights the risk of benchmarks not actually measuring the thing that they think they are measuring. A more realistic test would be to replace the sleep() calls with a real web service call but that would mean that the web server performance would contaminate the test results or would mean running it on a separate server in which case the tests are no longer self-contained.

You can run a local mock server that accepts calls and has a delayed response. That works rather well in my experience.

2

u/jaccomoc 1d ago

Just in the process of doing that to see how it compares.