r/programming • • Sep 15 '20

Java 15 released!

https://jdk.java.net/15/
214 Upvotes

130 comments sorted by

View all comments

Show parent comments

9

u/pron98 Sep 16 '20 edited Sep 16 '20

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).

-1

u/[deleted] Sep 16 '20

> 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.

6

u/pron98 Sep 16 '20 edited Sep 16 '20

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)