Java 在 Linux 虚拟机上占用过多内存
做了个top发现这个
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是24.5g,硬盘只有20g。
pmap -x 2970 显示 95 倍 262136k 作为 anon。
请问有什么问题吗??
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??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从实用的角度来看(发现进程使用了多少内存)VIRT列几乎没有意义,不用担心。
Java 下的虚拟内存使用情况Linux,使用了太多内存
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