Sudden Decrease in Java Heap Memory (openfire 3.7.1)

Hi Openfire Team,

Recently, we have upgraded from Openfire 3.6.4 to Openfire 3.7.1 which is on Centos 5.3. After, upgrade we had found that Java Heap memory was increased to 90%. (FYI, earlier, before upgrade the Java Heap Memory utilization was 75%).

One more observation was that, our Phyiscal Memory utilization came down to 50% after upgrade ( Before upgrade, our Physical Memory Utilization was 96%).

As the Java-Heap-Memory is utilized upto 90%, we thought of increasing the Heap memory parameter in “/etc/sysconfig/openfire”. We have increased Java-Heap-Memory from 2048 to 3072.

But, after changing the Java-heap-memory to “3072” and restarting the server. we have found a drastic decrease of Java-heap-memory to 1024mb.

Can you please explain the reason behind this sudden change. Also, can you help us out in acheiving 3Gb memory.

FYI, we have a total of 8GB RAM in our Machine.

Heap Memory settings Before:

OPENFIRE_OPTS="-Xms2048m -Xmx2048m -Xss128k -Xoss128k -XX:ThreadStackSize=128"

Heap Memory settings After:

OPENFIRE_OPTS="-Xms3072m -Xmx3072m -Xss128k -Xoss128k -XX:ThreadStackSize=128"

Kindly find the attached log files.

Thanks & Regards,

A.H.V.K. Mouli
error.log.zip (4323 Bytes)
warn.log.zip (11406 Bytes)



nohup.out.zip (236 Bytes)

I am not certain how things behave when asking for 3 GB of memory for java on a 32bit OS / JVM

Hi Daryl / Openfire Team,

we have now changed the Heap-size to 2600Mb but, the openfire server is unstable, it is crashing after every 15 minutes. Also, it generating a special log file “hs_err_pid20861.log” in /opt/openfire/logs.

Please find the attached “hs_err_pid20861.log” file.

The output of the file is as follows,

A fatal error has been detected by the Java Runtime Environment:

java.lang.OutOfMemoryError: requested 755272 bytes for Chunk::new. Out of swap space?

Internal Error (allocation.cpp:272), pid=20861, tid=210697104

Error: Chunk::new

JRE version: 6.0_24-b07

Java VM: Java HotSpot™ Server VM (19.1-b02 mixed mode linux-x86 )

If you would like to submit a bug report, please visit:

http://java.sun.com/webapps/bugreport/crash.jsp

--------------- T H R E A D ---------------

Current thread (0x09d9f000): JavaThread “CompilerThread0” daemon [_thread_in_native, id=20882, stack(0x0c86f000,0x0c8f0000)]

Stack: [0x0c86f000,0x0c8f0000], sp=0x0c8ecff0, free space=503k

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)

V [libjvm.so+0x708370]

V [libjvm.so+0x2e8aaf]

Current CompileTask:

C2:2465 ! org.jivesoftware.openfire.pep.PEPService.sendNotification(Lorg/jivesoftware/ope nfire/pubsub/Node;Lorg/xmpp/packe

t/Message;Lorg/xmpp/packet/JID;)V (695 bytes)

--------------- P R O C E S S ---------------

Java Threads: ( => current thread )

0x06ffec00 JavaThread “pool-18-thread-2” [_thread_blocked, id=25875, stack(0x0682f000,0x06850000)]

" There are many lines of code here "

" There are many lines of code here "*** ***

0d53a000-0d54b000 rwxp 0d53a000 00:00 0

0d54b000-0f6c0000 rwxp 0d54b000 00:00 0

VM Arguments:

jvm_args: -Xms2600m -Xmx2600m -Xss128k -Xoss128k -XX:ThreadStackSize=128 -DopenfireHome=/opt/openfire -Dopenfire.lib.dir=/opt

/openfire/lib

java_command: /opt/openfire/lib/startup.jar

Launcher Type: SUN_STANDARD

Environment Variables:

JAVA_HOME=/opt/openfire/jre

PATH=/sbin:/bin:/usr/bin:/usr/sbin

LD_LIBRARY_PATH=/opt/openfire/jre/lib/i386/server:/opt/openfire/jre/lib/i386:/op t/openfire/jre/…/lib/i386

SHELL=/bin/sh

Signal Handlers:

SIGSEGV: [libjvm.so+0x708f80], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004

SIGBUS: [libjvm.so+0x708f80], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004

SIGFPE: [libjvm.so+0x5c4100], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004

SIGPIPE: [libjvm.so+0x5c4100], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004

SIGXFSZ: [libjvm.so+0x5c4100], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004

SIGILL: [libjvm.so+0x5c4100], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004

SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000

SIGUSR2: [libjvm.so+0x5c70e0], sa_mask[0]=0x00000000, sa_flags=0x10000004

SIGHUP: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000

SIGINT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000

SIGTERM: [libjvm.so+0x5c6cc0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004

SIGQUIT: [libjvm.so+0x5c6cc0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004

--------------- S Y S T E M ---------------

OS:CentOS release 5.3 (Final)

uname:Linux 2.6.18-128.el5PAE #1 SMP Wed Jan 21 11:19:46 EST 2009 i686 libc:glibc 2.5 NPTL 2.5

rlimit: STACK 10240k, CORE 0k, NPROC 139264, NOFILE 32768, AS infinity

load average:0.83 0.82 0.83

/proc/meminfo:

MemTotal: 8313264 kB

MemFree: 5168196 kB

Buffers: 120384 kB

Cached: 1296940 kB

SwapCached: 0 kB

Active: 2001880 kB

Inactive: 1065228 kB

HighTotal: 7470720 kB

HighFree: 4508956 kB

LowTotal: 842544 kB

LowFree: 659240 kB

SwapTotal: 8193140 kB

SwapFree: 8193140 kB

Dirty: 5644 kB

Writeback: 0 kB

Thanks & Regards,

A.H.V.K Mouli
hs_err_pid20861.log.zip (12271 Bytes)
hs_err_pid20861.log.zip (12271 Bytes)

To use 3 GB you want to use a 64 bit OS and JVM. With the current settings the java process has not enough native memory.

Hi LG,

By changing the OS to 64 bit and using a 64bit Java (JDK), do you think my problem(Java-Heap-Memory) will be addressed? Further, i would like to know, if there is any 64bit of Openfire as the openfire download page shows 32bit only.

With java, just have a 64bit JVM installed, that is all that is necessary. The openfire download is called 32bit as the included JVM is 32bit.

daryl