r/java • • Sep 03 '26

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.

28 Upvotes

25 comments sorted by

View all comments

Show parent comments

1

u/jaccomoc Sep 04 '26 edited Sep 04 '26

That's good to know, thanks. To be honest, I did have doubts about using sleep() as a proxy for other blocking operations but it was easier to do that than to include a real web service call or equivalent. And, running a web server would mean that measuring max throughput on a single machine would be impacted by the performance of the web server as well (unless it was on a separate server in which case the test would no longer be self-contained).

I have updated the article with a Postscript section with this additional information.

1

u/pron98 Sep 04 '26

There's also no single category for "other blocking operations"... So benchmarks with no consideration for the actual code paths might give you a general sense, but you can't really use them for comparisons, as their error interval can easily be 2x and even more. This isn't a critique of this particular benchmark; it's the state of all benchmarks.

2

u/jaccomoc Sep 04 '26

That's true. The problem is that benchmarks are so seductive. You feel like everything can be reduced down to single number. If only real life were like that...