1

Doing a top shows this

top - 22:04:27 up  7:47,  3 users,  load average: 0.02, 0.08, 0.26
Tasks:   1 total,   0 running,   1 sleeping,   0 stopped,   0 zombie
Cpu(s):  2.9% us,  0.9% sy,  0.0% ni, 95.9% id,  0.0% wa,  0.0% hi,  0.2% si
Mem:   7914188k total,  2750184k used,  5164004k free,    54392k buffers
Swap: 16383992k total,        0k used, 16383992k free,   415828k cached

  PID USER    PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2970 xxxxxx  18   0 24.5g 258m  10m S    0  3.3   0:42.05 java

VIRT is 24.5g and the hard disk is only 20g.

pmap -x 2970 reveals 95 times 262136k as anon.

Please advise as to is something wrong??

Ram
  • 2,237
  • 4
  • 23
  • 27
  • 1
    http://man-wiki.net/index.php/1:top#2a._DESCRIPTIONS_of_Fields The interesting column is the RES-Column. VIRT is always close to your total memory. – Searles Apr 22 '10 at 14:32
  • See also http://stackoverflow.com/questions/26041117/growing-resident-memory-usage-rss-of-java-process/35610063 – Lari Hotari Sep 07 '16 at 09:30

1 Answers1

2

From a practical point of view (discover how much memory is used by the process) the VIRT column is almost meaningless, don't worry about it.

Virtual Memory Usage from Java under Linux, too much memory used

Community
  • 1
  • 1
leonbloy
  • 73,180
  • 20
  • 142
  • 190
  • why in pmap is 262136k anon 95 times. Also do you mean I shouldn't worry about this ? – Ram Apr 22 '10 at 14:25
  • Frankly, I'm not clear about the pmap result, but I wouldnt worry about memory used by your java process, RES column is the more relevant indicator here. – leonbloy Apr 22 '10 at 15:33