Edit: Okay, I got a lot of interesting comments here when I just made a joke. Still, it is fun to read it all and to see just bow dedicated the Java guys are to their language
I'm happy that in our company we moved (still moving actually) to Java 11, newer projects at least. My colleagues are still afraid of using var though, so nothing changed really.
This was not my experience when my company migrated java 8 -> 11. We saw a number of our services increase RSS size by around 1gb. There was oddly no accounting for the increase in memory size in the heap dumps or native memory tracking, we eventually just accepted that some services would use more memory.
Do you mean that there's more heap consumed by data or that the Java process takes up more RAM from the OS? If it's the former, it is indeed strange and does require investigation (e.g. the footprint of most strings has been nearly halved in JDK 9, and this is the general trend of overall footprint we see). If the latter, it's probably a simple matter of different defaults. Remember that a Java process takes as much RAM as you tell it; if you don't, it will take up some heuristically-chosen default value that can change significantly from one release to another (I think that the default for G1, which is the default GC since 9, is to now take up 1/4 of total RAM unless you tell it otherwise).
> Do you mean that there's more heap consumed by data or that the Java process takes up more RAM from the OS
The answer to this question is stated twice in my answer.
> increase RSS size by around 1gb
Resident set size is physical memory, i.e. RAM.
> no accounting for the increase in memory size in the heap dumps
For your other questions:
> Remember that a Java process takes as much RAM as you tell it
I mentioned taking heap dumps and using the Java native memory tracker in my answer, obviously I'm aware of the options for RAM. We set max sizes for heap size, meta space, direct memory, etc. If it was one of those, we would have been able to see the difference in the native memory tracker output. Instead there was a gap between the resident memory size used by the JVM and the memory reported by the native memory ticket. I filed a ticket with the hotspot mailing list, but the devs seem uninterested.
I filed a ticket with the hotspot mailing list, but the devs seem uninterested.
As one of the devs, I can attest that we are always very interested, especially when dealing with such a serious regression. Sometimes, however, things can be deprioritised if it is judged that the situation would only affect a very small minority of people. Can you please point me out to the relevant message you sent and I'll try to find out what happened? (EDIT: continued privately)
215
u/Ravoos Sep 15 '20 edited Sep 15 '20
Java devs: Cool.....I'm still using Java 8 tough.
Edit: Okay, I got a lot of interesting comments here when I just made a joke. Still, it is fun to read it all and to see just bow dedicated the Java guys are to their language