[Bug 565101] Re: walrus reports java.lang.OutOfMemoryError: Java heap space
Thierry Carrez
thierry.carrez at ubuntu.com
Thu Apr 22 07:48:08 BST 2010
Important note: when not specified, max heap size is set to:
***
Smaller of 1/4th of the physical memory or 1GB. Before J2SE 5.0, the default maximum heap size was 64MB. You can override this default using the -Xmx command-line option.
***
So it sounds like moving from no value to to -Xmx384m would actually
reduce the maximum heap size on most server systems, and that the
default value is sanely calculated from available memory. It also makes
a case for *not* specifying the value by default, something like:
XMX=""
[ -n ${MAXHEAPSIZE} ] && XMX="-Xmx ${MAXHEAPSIZE}m"
opts="-h $EUCALYPTUS -u $EUCA_USER --pidfile /var/run/eucalyptus/eucalyptus.pid -l $LOGLEVEL -L console-log $XMX"
Or even
# Extra options passed to JVM call. For exemple you can set a 1Gb maximum heap size by setting
# EXTRAOPTS="-Xmx1024m"
EXTRAOPTS=""
opts="-h $EUCALYPTUS -u $EUCA_USER --pidfile /var/run/eucalyptus/eucalyptus.pid -l $LOGLEVEL -L console-log $EXTRAOPTS"
In all cases, confirming that the observed memory profile usage is
judged sane by upstream (and setting max heap size is their recommended
way of handling load) needs to happen before the fix.
--
walrus reports java.lang.OutOfMemoryError: Java heap space
https://bugs.launchpad.net/bugs/565101
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to eucalyptus in ubuntu.
More information about the Ubuntu-server-bugs
mailing list