~/talk

Demystifying Java Virtual Threads

Talkat GeeCON 2024 · 2024-05-15..05-17· [java]
links:none on file
slides:none on file

Explains how Java 21 virtual threads run as heap objects scheduled onto a small set of OS carrier threads, shows a GlassFish/Grizzly executor was implemented to run incoming requests on virtual threads, and reports measured effects: about 15% throughput gain in a simple benchmark, sometimes nearly 2x in full GlassFish, but runaway creation hits the heap (demo reaches ~9 million virtual threads and GC starvation) and platform threads reserve ~1 MB stacks (32k → ~32 GB). Debunks myths: thread‑locals work, synchronized is safe except when blocking inside a lock, and semaphores are recommended to limit concurrency.

AI-written summary · about

  1. 0:00Introduction and speaker background
  2. 11:28Traditional platform threads limitations
  3. 16:27Virtual threads promise and advantages
  4. 28:17Real-world experience with GlassFish
  5. 33:39Common myths about virtual threads
  6. 42:38Replacing platform threads with virtual threads
  7. 48:06Virtual threads vs reactive programming
  8. 52:02Q&A session
~/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.