Dev Tools · 1h ago
Virtual Thread Pinning: The Hidden Performance Killer in Java Loom
A service migrated to virtual threads plateaued at 420 requests per second on an 8-core machine due to pinning, where virtual threads block carrier threads. Pinning occurs only in two scenarios: blocking inside synchronized blocks (JDK 21-23) or native frames. JDK 24 fixes the synchronized case but not native frames, leaving developers vulnerable to scheduler starvation.
Meridian48 take
This deep dive reveals that Loom's promise of massive scalability can be silently undermined by common coding patterns, making it essential for Java developers to understand pinning before migrating production systems.
Read the full reporting
Your Loom App Quietly Became a Thread Pool Again: A Field Guide to Virtual Thread Pinning →
DEV Community
java-loomvirtual-threads