-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alfredo,

On 2/14/12 10:05 AM, Alfredo Alessandrini wrote:
> Now I've put in setenv.sh this settings:
> 
> export JAVA_OPTS="-Xms64m -Xmx128m -XX:MaxPermSize=128m"

So, you have a user limit of 256MiB and you have your heap set to
128MiB and your max perm gen set to 128MiB. What about thread stacks?
What about native stack and heap?

There's a lot to a Java process besides what -Xmx can limit.

Also, if your *user* is limited to 256MiB then you also have to think
about all the other things you are going to want to run -- like
/bin/sh, /bin/ls, etc. that also take a bit of memory. You're going to
need to start up a JVM in order to shut-down Tomcat if you want to use
bin/shutdown.sh (there are other ways to shut down Tomcat if that's a
problem).

I'm not sure there is a way to tell Java not to use more than a
particular amount of total memory. If it were me, I'd make the maximum
heap size as small as you think you can get away with (can you do
32MiB? 64MiB?) and leave everything else alone until you have a problem.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk86lbYACgkQ9CaO5/Lv0PBvbQCglpC2svqYOLsAm9ZNiqDZlSE7
X3oAn2K3TomYc20Hki+sT3Aj9TOKQr82
=/siH
-----END PGP SIGNATURE-----

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

Reply via email to