tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Max heap size
Date Fri, 08 Jan 2010 16:27:28 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chuck,

On 1/8/2010 9:37 AM, Caldarale, Charles R wrote:
> Experimenting to find the largest -Xmx value for your environment
> should only take a few minutes.

I used this script long ago and got something like 2600 MiB as the max I
could use. I just tried it (moved to a VM recently) and it never
returned a valid max heap. Something might be wrong with the script or
the (hardware) VM configuration.

#!/bin/sh

initial_max=4097

max=${initial_max}
return_value=1

while [ "1" == "$return_value" ] ; do
  max=`expr ${max} - 1`

  if [ "0" == `expr ${max} % 100` ] ; then
    echo "(max=${max})"
  fi
  java -Xms${max}M -Xmx${max}M MemoryInfo > /dev/null 2>&1

  return_value=$?
done

echo
echo Stopped with max=${max}
echo Return value was ${return_value}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktHXPAACgkQ9CaO5/Lv0PB9LACfeMPE0r2+F32dNX8iOb2zsnSK
kA0AnApF0JsenFvK58yqrd5AQBn54ToK
=LM48
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message