Hacker News new | ask | show | jobs
by bno1 1184 days ago
That's most likely reserved virtual memory. It's not committed, meaning it's not backed by physical memory.
1 comments

From what I could check those are all memory mapped files.

Required simply by ZGC to work, but still its super confusing and convoluted and our tooling is not aware of that at all.

Well yes, because on Linux you use mmap to reserve virtual memory.

I wouldn't say that tooling is not aware of all that. For example, top and htop display virtual memory and resident memory and shared memory. You need to look at resident memory if you want to know physical memory usage.

What I meant by tooling not being aware is that its hard to pinpoint what exactly is using that memory.

Best you can do is do dumps, verify, enable NMT, verify.

It gives me no value to know that my heap is 60m, but my RSS is 600mb while reserved is 40GB. Need more details and those are not always provided i.e. “Unknown” category in NMT details.

Best is that top, pmap and nmt are all showing completely different values for resident size :> and its not a unit issue.

Not dumped to the OS of course, but JMX does have metrics for a lot of the in use non heap storage like codegen, profiler, etc..