~/talk

Fantastic Virtual Threads and How to Monitor Them

Talkat JCON WORLD ONLINE 2023 · on Tuesday, 2023-11-21· at 10:00· Live-Stream 3, Online - Remote· [java, observability]
slides:none on file

Project Loom arrives in Java 21 with lightweight virtual threads and the demo shows monitoring via JFR adds four events, jcmd thread dump JSON and UI tools JMC/VisualVM. A Spring Boot app creates many virtual threads (recording shows 68 virtual threads), JFR flags five thread pin events each ~5s tied to a synchronized block plus a random Thread.sleep, and switching the synchronized block to a ReentrantLock and removing the sleep eliminates the errors.

AI-written summary · about

  1. 0:00Introduction and demo setup
  2. 3:31What are virtual threads
  3. 13:40Virtual thread spinning explained
  4. 15:48Monitoring tools overview
  5. 16:53Using jcmd for diagnostics
  6. 26:18JDK Flight Recorder deep dive
  7. 32:00JDK Mission Control walkthrough
  8. 35:13VisualVM overview
  9. 37:46Monitoring virtual threads in action
  10. 44:34Fixing the demo application
  11. 45:17Q&A on virtual thread pinning
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.