top | item 37539128

(no title)

leapis | 2 years ago

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

discuss

order

xxs|2 years ago

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.

threeseed|2 years ago

If you GraalVM Native Image or one of the frameworks based on it then bootstrap cost disappears:

https://quarkus.io

bberrry|2 years ago

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.

hmottestad|2 years ago

Is that what happened at your company?

leapis|2 years ago

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.