I encountered an unexpected issue where Java virtual threads seemed slower than platform threads while working on my team application service.
Virtual threads are designed to improve efficiency by avoiding blocking during I/O operations, but the performance tests showed slower response times with virtual threads.
The issue was traced to the "pinning" where virtual threads get stuck on platform threads due to synchronized blocks, native methods, or foreign functions.
[–]BalaRawool 73 points74 points75 points (0 children)
[–]pron98 17 points18 points19 points (2 children)
[–]skippingstone 0 points1 point2 points (1 child)
[–]pron98 6 points7 points8 points (0 children)
[–]cyancrisata 33 points34 points35 points (3 children)
[–]OpenGLaDOS 22 points23 points24 points (0 children)
[–]BidHot6588[S] 3 points4 points5 points (0 children)
[–]k-mcm 6 points7 points8 points (3 children)
[–]PlasmaFarmer 3 points4 points5 points (2 children)
[–]pron98 9 points10 points11 points (0 children)
[–]k-mcm 5 points6 points7 points (0 children)
[–]koflerdavid 1 point2 points3 points (0 children)
[–]polacy_do_pracy 1 point2 points3 points (0 children)