News for hackers. Stuff that matters.
Re:Java 21 makes me like Java again by hmottestad on Saturday September 16, 2023 @05:46PM (#37539044)
Going from 11 to 21 is a lot easier.
Re:Java 21 makes me like Java again by leapis on Saturday September 16, 2023 @05:56PM (#37539128)
Depends- one of the hardest parts of the 11-20 upgrade for us was that cms gc was removed.

If you run a bunch of different microservices with distinct allocation profiles, all with high allocation pressure and performance constraints, and you've accomplished this w/ the help of a very fine-tuned CMS setup, migrating that over to G1/ZGC is non-trivial

Re:Java 21 makes me like Java again by xxs on Saturday September 16, 2023 @06:10PM (#37539263)
Java sort of suck for microservices (microservices suck on their own) as it has relatively high bootstrap cost.

High allocation rate feels weird with micro services - I suppose that depends a lot on the coding style. G1GC is meant for generally large setups, with several cores at least. E.g. the default setup of 2048 areas on 2GB heap means, allocations over 1MB require special care.

Re:Java 21 makes me like Java again by threeseed on Saturday September 16, 2023 @07:24PM (#37539849)
If you GraalVM Native Image or one of the frameworks based on it then bootstrap cost disappears:

https://quarkus.io

Re:Java 21 makes me like Java again by wice on Sunday September 17, 2023 @05:54AM (#37543277)
GraalVm is great, it made our Spring REST API app go from 10+ seconds to 0.5 seconds on startup (not to mention the lower mem and cpu requirements).

Except… when we try to build it with Jenkins on a Kubernetes cluster, this happens: https://github.com/oracle/graal/issues/7182

Re:Java 21 makes me like Java again by hmottestad on Saturday September 16, 2023 @05:59PM (#37539152)
Is that what happened at your company?
Re:Java 21 makes me like Java again by leapis on Saturday September 16, 2023 @06:07PM (#37539243)
Yup. We've clearly benefitted- G1 and generational ZGC have large advantages over CMS- but it's a lot of experimentation and trial-and-error to get there, whereas other deprecations/removals are usually easier to resolve.
Re:Java 21 makes me like Java again by kaba0 on Saturday September 16, 2023 @06:32PM (#37539455)
Isn't the default config correct for pretty much all workloads, unless you have very special requirements? Like, at most one should just change the target max pause time in case of G1, depending on whether they prefer better throughput at the price of worse latency, or the reverse.
Re:Java 21 makes me like Java again by bberrry on Saturday September 16, 2023 @06:54PM (#37539633)
I can't help but think if you're teetering on a knife's edge, only holding on thanks to hyper tuned GC params, then you should take a step back and consider getting out of that predicament.