Why is there a difference between the ps RSS value and the committed value in Native Memory Tracking?
Issue
The ps RSS shows the resident set size of the java process as 436832
KB, but Native Memory Tracking shows the committed size as 1590457
KB. Why such a huge difference? Which value is the actual memory usage?
$ ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
...
jboss 586382 4.2 1.8 2750076 436832 pts/5 Sl+ 16:31 0:22 /usr/lib/jvm/java-11-openjdk/bin/java -D[Standalone] -server ...
$ jcmd 586382 VM.native_memory
586382:
Native Memory Tracking:
Total: reserved=2138313KB, committed=1590457KB <<<===
Environment
- OpenJDK 11
- Native Memory Tracking
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.