Below picture shows result of htop
on my server (sorry was not able to upload it here due to technical issues on SO, pasting imgur link).
My observations:
- We have enough ram (8/15GB memory is used)
Xmx
for my java app allows up to 4G heap- Still the java app's RES column is only ~400MB
- However, app's VIRT is 9.6GB!
Question: Why doesn't JVM use the entire 4GB heap space it is allowed to use? and uses virtual memory instead?