Session

Fantastic Virtual Threads and How to Monitor Them

As part of Project Loom, Virtual Threads have been released in Java 21. They are lightweight user threads, enabling Java applications to produce thousand (or even million) times more threads. But how do we monitor them?

We will discuss the features of Virtual Threads but also look at a few tools that help us monitor Java applications with Virtual Threads: JFR, JMC, VisualVM and jcmd. JFR is a low overhead, event-based tracing framework, built into the Java Runtime. It records various events related to JVM and can export them for later analysis. It captures data points for more than 180 events. JMC is a tool used to visually analyse the JFR exports. VisualVM provides similar monitoring and profiling capabilities. jcmd helps us send diagnostic commands to Java applications.

In order to support virtual threads, this monitoring toolset has also been adapted. JFR has been updated to support 4 more events. We will see how these events are captured for an application with virtual threads and how they can be analysed in JMC. jcmd now supports thread-dump in json format and we will see a live demonstration of that as well.

This talk will introduce the concept of virtual threads to the audience and it will make them aware of the changes coming in the monitoring toolset. Thus, preparing them to be ready when they actually want to use these features.

Balkrishna Rawool

IT Chapter Lead at ING Bank NV

Utrecht, The Netherlands

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top