内存转储比可用内存小得多 [英] Memory dump much smaller than available memory

查看:120
本文介绍了内存转储比可用内存小得多的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Tomcat应用程序服务器,该服务器配置为在OOM上创建内存转储,并且以-Xmx1024M开头,因此应为他提供1G的存储空间.

现在,我找到了一个这样的转储,它仅包含260MB的未保留内存.转储怎么可能比他应该拥有的大小小得多?

解决方案

Permgen空间是独立于堆进行管理的,即使总体上有大量可用内存,该空间也可能会用完.某些Web框架(尤其是JSF)是真正的猪,虽然很容易导致默认配置用完.可以使用-XX:MaxPermSize = ### m

来增加它

请记住,系统空间受堆和permgen的总和限制,因此,如果不以增加PermGen的量减少堆,则可以在开始出现Cannot Create Native Thread OOM异常之前消耗更少的总资源. /p>

I have a Tomcat Application Server that is configured to create a memory dump on OOM, and it is started with -Xmx1024M, so a Gigabyte should be available to him.

Now I found one such dump and it contains only 260MB of unretained memory. How is it possible that the dump is so much smaller than the size he should have available?

解决方案

Permgen space is managed independently of the heap and can run out even when there's plenty of free memory overall. Some web frameworks (especially JSF) are real hogs and while easily cause the default config to run out. It can be increased with -XX:MaxPermSize=###m

Remember the system space is constrained by the sum of heap and permgen, so you can consume fewer total resources before you start getting the Cannot Create Native Thread OOM exception if you don't decrease heap by the amount PermGen is increased.

这篇关于内存转储比可用内存小得多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆