JVM和内存使用 - JRun服务器不使用完整的PSPermGen分配? [英] JVM and Memory Usage - JRun server not using full PSPermGen allocation?
问题描述
我试图理解为什么ColdFusion 9(JRun)服务器抛出以下错误:
java.lang .OutOfMemoryError:请求32756字节的ChunkPool :: allocate。在交换空间?
JVM参数如下:
-server -Dsun.io.useCanonCaches = false -XX:MaxPermSize = 192m -XX:+ UseParallelGC -
当转储发生时,我有jconsole运行,我试图调和上面的 -XX:MaxPermSize = 192m
。当JRun死时,它有以下内存使用:
堆
PSYoungGen总计136960K,使用60012K [0x5f180000,0x67e30000, 0x68d00000)
eden space 130624K,45%used [0x5f180000,0x62c1b178,0x67110000)
从空间6336K,0%使用[0x67800000,0x67800000,0x67e30000)
到空间6720K,0% 0x67110000,0x67110000,0x677a0000)
PSOldGen总计405696K,使用241824K [0x11500000,0x2a130000,0x5f180000)
对象空间405696K,使用率59%[0x11500000,0x20128360,0x2a130000)
PSPermGen总计77440K 77070K [0x05500000,0x0a0a0000,0x11500000)
对象空间77440K,99%已使用[0x05500000,0x0a043af0,0x0a0a0000)
我的第一个问题是转储显示 PSPermGen
是问题 - 它说总共是77440K,但它应该是196608K(基于我的192m JVM参数),对不对?我在这里缺少什么?这是与其他非堆池 - 代码缓存有关吗?
我运行在32位机器上,Windows Server 2008 Standard。我想增加 PSPermGen
JVM参数,但我想知道为什么它似乎没有使用其当前的分配。
提前感谢!
out of swap space操作系统更多的内存,并且操作系统已经无法满足请求,因为所有交换(磁盘)空间已经被分配。基本上,你对可用的虚拟内存量进行了系统级的硬限制。
这可能发生在你的应用程序没有错误或JVM 。或者它可能是增加 -Xmx
等超出系统支持它的能力的结果。
有三个解决方法:
-
向系统添加更多物理内存。
-
增加系统上可用的交换空间量;例如在Linux上查看
swapon
和朋友的手动输入。 (但请注意,活动虚拟内存与物理内存的比例不会过大...或者您的系统容易出现thrash,性能会下降。) -
减少系统上正在运行的进程的数量和大小。
<如果你遇到这种情况,因为你一直在增加
-Xmx
与其他OOME战斗,那么现在是跟踪(可能)内存泄漏的好时机是您的问题的根本原因。 I'm trying to understand why out ColdFusion 9 (JRun) server is throwing the following error:
java.lang.OutOfMemoryError: requested 32756 bytes for ChunkPool::allocate. Out of swap space?
The JVM arguments are as follows:
-server -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:+UseParallelGC -
I had jconsole running when the dump happened and I am trying to reconcile some numbers with the -XX:MaxPermSize=192m
setting above. When JRun died it had the following memory usage:
Heap
PSYoungGen total 136960K, used 60012K [0x5f180000, 0x67e30000, 0x68d00000)
eden space 130624K, 45% used [0x5f180000,0x62c1b178,0x67110000)
from space 6336K, 0% used [0x67800000,0x67800000,0x67e30000)
to space 6720K, 0% used [0x67110000,0x67110000,0x677a0000)
PSOldGen total 405696K, used 241824K [0x11500000, 0x2a130000, 0x5f180000)
object space 405696K, 59% used [0x11500000,0x20128360,0x2a130000)
PSPermGen total 77440K, used 77070K [0x05500000, 0x0a0a0000, 0x11500000)
object space 77440K, 99% used [0x05500000,0x0a043af0,0x0a0a0000)
My first question is that the dump shows the PSPermGen
being the problem - it says the total is 77440K, but it should be 196608K (based on my 192m JVM argument), right? What am I missing here? Is this something to do with the other non-heap pool - the Code Cache?
I'm running on a 32bit machine, Windows Server 2008 Standard. I was thinking of increasing the PSPermGen
JVM argument, but I want to understand why it doesn't seem to be using its current allocation.
Thanks in advance!
An "out of swap space" OOME happens when the JVM has asked the operating system for more memory, and the operating system has been unable to fulfill the request because all swap (disc) space has already been allocated. Basically, you've hit a system-wide hard limit on the amount of virtual memory that is available.
This can happen through no fault of your application, or the JVM. Or it might be a consequence of increasing -Xmx
etc beyond your system's capacity to support it.
There are three approaches to addressing this:
Add more physical memory to the system.
Increase the amount of swap space available on the system; e.g. on Linux look at the manual entry for
swapon
and friends. (But be careful that the ratio of active virtual memory to physical memory doesn't get too large ... or your system is liable to "thrash", and performance will drop through the floor.)Cut down the number and size of processes that are running on the system.
If you got into this situation because you've been increasing -Xmx
to combat other OOMEs, then now would be good time to track down the (probable) memory leaks that are the root cause of your problems.
这篇关于JVM和内存使用 - JRun服务器不使用完整的PSPermGen分配?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!