0

无法在具有相同 java 版本的两个相同系统之一上分配堆。如果我在故障系统上将堆栈大小限制 (ulimit -s) 设置得更高,它就会起作用。'strace' 表明 java 在 mmap2() 中的第二个系统上失败。我需要向 QA/开发人员解释我支持为什么会这样。有什么建议为什么他们表现不同?:

[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.

但它适用于第一个系统:

[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)

两者都具有相同的 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

[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

两者基本上都有相同的限制:

[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
4

0 回答 0