java ps old gen,JVM和内存使用 - JRun服务器不使用完整的PSPermGen分配?

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值