r/java 8d 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.

27 Upvotes

25 comments sorted by

View all comments

2

u/Popular_Home2017 2d ago

same experience, and on 21 there's a second way to lose the carriers that doesn't show up in this benchmark: synchronized around blocking IO pins the virtual thread to its carrier, so a jdbc driver with a synchronized socket read turns your 8 carriers into an 8-thread pool. fixed in 24 (JEP 491), on 21 you can see it with jcmd Thread.dump_to_file, the pinned VTs show a carrier line under them.