Interesting articles from Netflix
Detective story about virtual threads
In the article name Java 21 Virtual Threads - Dude, Where’s My Lock? Netflix guys shared their experience about usage of Virtual threads. It is written as a really interesting story which leads us to think that not Virtual threads despite bringing tremendous opportunities and effectiveness can cause problems some issues. In particular developers discovered that some of their services were hanging and not serving any incoming requests at all. After a thorough investigation they found the core reason of a problem which is a new type of a dead lock situation caused by virtual threads, when virtual threads are still pinned to OS thread (meaning occupying it and not releasing it) while being in synchronized
block leaving no spare OS thread to be used by any new virtual thread.
Great story about new generational ZGC
Bending pause times to your will with Generational ZGC article real life usage example of a new Garbage Collector from Java which:
- significantly reduces pauses to clean up memory and thus reduces tail latencies
- helps identifying actual sources of latency by removing pollution of statistics with big pauses Guys use it as a default GC for some time already and recommend trying it out ourselves
Tips to run your Maven build faster
4 Tips for Troubleshooting Slow Maven Builds light article with useful tricks to speed up your build process.
My personal favourite is simple flag -T 1C
that allows you to run your build in parallel if possible. On my project it saves approximately whooping 50% of build time.
mvn -T 1C clean install
You can now buy KotlinConf 2025 tickets with a discount
The sales of tickets for KotlinConf already started, and you can buy them with an early bird discount. Link for registration