1. Home
  2. Docs
  3. Glossary
  4. V
  5. Virtual Threads

Virtual Threads

Virtual threads have been introduced in Java 17 and rolled out in Java 21 LTS.
See JEP-425 for more details and https://docs.oracle.com/en/java/javase/20/core/virtual-threads.html.

Jeyzer 3.1+ is supporting this new dimension and therefore permits to :
– Display it in a convenient way by grouping the virtual threads having the same stack trace. That way, the unmounted threads are easily displayed.
– Generate alerts (monitoring events) on the number of generated virtual threads as well as on on the virtual thread CPU usage.
– Compute statistics, histograms and percentage calculations taking into account the the virtual thread related data (function, operation, count..)

In Java, the standard exposure of virtual threads is still poor at this stage :
JCMD is the only tool that captures the virtual thread stacks as part of a file thread dump. But it is missing any other information such as the thread state and lock information.
JFR exposes virtual thread creation and termination events which gives an indication on the number of virtual threads.

Virtual threads rely on native carrier threads which are always visible whatever the recording method : it gives an indication on the virtual thread usage.