Exploring the performance differences between Java virtual threads and platform threads, the post highlights how virtual threads can enhance service performance by avoiding idle time during I/O operations. It covers enabling virtual threads in Spring Boot, building a test API for comparison, and performance comparisons using Apache HTTP server benchmarking. The author identifies pinning as the reason for unexpected slowdowns and concludes with strategies for overcoming limitations using MySQL Connector/J.

2m read timeFrom medium.com
Post cover image
Table of contents
Why are my Java virtual threads slower than the platform threads?Let’s walk through virtual threads before I explain what’s happened to me

Sort: