Did anybody benchmark the compact object headers effects on Clojure when using Java 27?
We turned it on in production when it first came into preview. I remember we saw a small but noticeable drop in heap usage, but I no longer remember the details. That was ages ago. Haven't got JDK 27 in production yet to see if any further changes have happened (we're on JDK 26 in production but with preview features enabled).
Here's my thread about it from about 18 15 months ago: https://clojurians.slack.com/archives/C03S1KBA2/p1749236967041949
what I have heard anecdotally in the Java community is numbers in the 10-20% ballpark improvement in startup time and heap size
That jibes with my (now very vague) recollection of what we saw back when we started using it...
any rough edges? It feels very close to a free* lunch. And by free i presume an enormous amount of work with a very smart idea but that it just lands and works?
Apparently, it just works. I just enabled the JVM switches and restarted stuff at the time. No other changes needed.
sounds like a great friday project. awesome
they found a few things when they first released it but that stuff has all been addressed afaik
We upgrade the JDK in production every six months as each new version goes GA and, so far, it's been really smooth sailing for many, many versions.
there may be other talks out there that are newer, but I saw this one in the room and found it to be really impressive in the details https://www.youtube.com/watch?v=9ioh6kprnPE
just really high quality solid engineering work
iām excited to watch that tonight. thanks
Probably around sun.misc.Unsafe there could be some issues, which will eventually get sorted out when the offsets are corrected, maybe I am also wrong and it will be a non-issue.
actually, my bad I'm actually thinking of this slightly newer version! https://www.youtube.com/watch?v=kHJ1moNLwao
but those are mostly distinct sets of work so you could watch both if you really want to learn about everything :)
same guy 1 year between. sounds interesting to hear what changes
it's really additive - the older one is more about the compact object headers, the latter is about other things they've done since
We had customer benchmarking that showed roughly a 25% reduction in heap use in production settings once we switched to JVM25 and set -XX:+UseCompactObjectHeaders. It was a very big deal for us in terms of user satisfaction at the top end of some of our workloads.
And other than the heap reduction, no perceptible adverse changes. Just a free lunch.
https://github.com/defold/defold/pull/11354 Memory use improved by 5%, performance by 10-17%