Java Heap allocation acting different

Cannot allocate heap on one of two identical systems with the same version of java. If I set the stack size limit (ulimit -s) higher on the failing system it then works. 'strace' shows that java is failing on the second system in mmap2(). I need to explain to a QA/developer that I'm supporting why this is so. Any suggestions why they are acting different?:

[root@sys2 tmp]# /usr/lib/jvm/java-1.6.0-openjdk/bin/java -server -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

But it works on the first system:

[root@sys1 tmp]# /usr/lib/jvm/java-1.6.0-openjdk/bin/java -server -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.11) (rhel-1.61.1.11.11.el6_4-i386)
OpenJDK Server VM (build 20.0-b12, mixed mode)

Both with the same release of redhat:

[root@sys1 tmp]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)
[root@sys1 tmp]# uname -a
Linux sys1.XX.com 2.6.32-358.6.2.el6.i686 #1 SMP Tue May 14 15:48:44 EDT 2013 i686 i686 i386 GNU/Linux

and

[root@sys2 tmp]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.4 (Santiago)
[root@sys2 tmp]# uname -a
Linux sys2.XX.com 2.6.32-358.14.1.el6.i686 #1 SMP Mon Jun 17 15:57:40 EDT 2013 i686 i686 i386 GNU/Linux

Both have, essentially, the same limits in place:

[root@sys1 tmp]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 31287
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 8192
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

[root@sys2 tmp]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 95961
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 8192
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
链接地址: http://www.djcxy.com/p/80252.html

上一篇: 限制Ruby进程的堆大小不起作用

下一篇: Java堆分配行为不同