You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Mehrotra, Anurag" <am...@telebright.com> on 2009/06/16 16:09:54 UTC

Tomcat JVM configuration

My current setup: Windows Server 2003 on X86 (32bit).

Apache Tomcat 6.0.16

Apache Httpd server 2.059 with mod_jk

Using JVM 1.6.0_06 


Current setting for the JVM used by tomcat is as follows: 
Initial Memory pool -  768MB
Max Memory pool - 1536MB


Is there a way to go beyond 2GB for the max memory pool on the above
platform? 

Would Unix allow me to allocate more memory to tomcat (JVM)?

Thanks,


 ________________________________
Anurag			301-296-3838


The information contained in this message may be privileged and
confidential and protected from disclosure.  If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to the
message and deleting it from your computer.


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


RE: Tomcat JVM configuration

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mehrotra, Anurag [mailto:amehrotra@telebright.com]
> Subject: Tomcat JVM configuration
> 
> Current setting for the JVM used by tomcat is as follows:
> Initial Memory pool -  768MB
> Max Memory pool - 1536MB

By "pool", do you really mean "heap"?  Non-standard terminology only causes confusion.

> Is there a way to go beyond 2GB for the max memory pool on 
> the above platform?

If by pool you mean heap, then no.  You're lucky that you can get 1536m.

> Would Unix allow me to allocate more memory to tomcat (JVM)?

Maybe - depends on the process space your particular flavor of UNIX allows.  If you really need a significantly larger heap, you need to move to a 64-bit environment.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


RE: Tomcat JVM configuration

Posted by Jeffrey Janner <Je...@PolyDyne.com>.
You could try booting Windows with the /3G option.
That will get you a little more - say 100 to 200 Mb (VOE) - not what you
would really expect.
Everyone else is correct.
If you really need a significantly larger heap, you will need to go to a
64-bit OS and Java implementation.
I am in the process of doing this now for some installs of our app.

Jeff Janner

-----Original Message-----
From: Mehrotra, Anurag [mailto:amehrotra@telebright.com] 
Sent: Tuesday, June 16, 2009 9:10 AM
To: users@tomcat.apache.org
Subject: Tomcat JVM configuration

My current setup: Windows Server 2003 on X86 (32bit).

Apache Tomcat 6.0.16

Apache Httpd server 2.059 with mod_jk

Using JVM 1.6.0_06 


Current setting for the JVM used by tomcat is as follows: 
Initial Memory pool -  768MB
Max Memory pool - 1536MB


Is there a way to go beyond 2GB for the max memory pool on the above
platform? 

Would Unix allow me to allocate more memory to tomcat (JVM)?

Thanks,


 ________________________________
Anurag			301-296-3838


The information contained in this message may be privileged and
confidential and protected from disclosure.  If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to the
message and deleting it from your computer.


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



*******************************  NOTICE  *********************************
This message is intended for the use of the individual or entity to which 
it is addressed and may contain information that is privileged, 
confidential, and exempt from disclosure under applicable law.  If the 
reader of this message is not the intended recipient or the employee or 
agent responsible for delivering this message to the intended recipient, 
you are hereby notified that any dissemination, distribution, or copying 
of this communication is strictly prohibited.  If you have received this 
communication in error, please notify us immediately by reply or by 
telephone (call us collect at 512-343-9100) and immediately delete this 
message and all its attachments.


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


Re: Tomcat JVM configuration

Posted by Hassan Schroeder <ha...@gmail.com>.
On Tue, Jun 16, 2009 at 7:09 AM, Mehrotra,
Anurag<am...@telebright.com> wrote:

> Is there a way to go beyond 2GB for the max memory pool on the above
> platform?
>
> Would Unix allow me to allocate more memory to tomcat (JVM)?

Can't tell you anything about Windows but I'd think any 64-bit OS
would let you allocate more memory than 2GB  :-)

-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

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


Re: Tomcat JVM configuration

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anurag,

On 6/16/2009 10:09 AM, Mehrotra, Anurag wrote:
> My current setup: Windows Server 2003 on X86 (32bit).
> Apache Tomcat 6.0.16
> Using JVM 1.6.0_06 
> 
> Current setting for the JVM used by tomcat is as follows: 
> Initial Memory pool -  768MB
> Max Memory pool - 1536MB
> 
> Is there a way to go beyond 2GB for the max memory pool on the above
> platform? 

No, this is about the maximum heap size you can reliably get from a
32-bit JVM on Windows. You probably can't even get close to 2 actual GiB
of heap space (above, you have 1536MiB).

> Would Unix allow me to allocate more memory to tomcat (JVM)?

If you can, it's only coincidental. The real solution is to move to a
64-bit JVM (which, of course, requires a 64-bit OS).

On my dev system (Linux 2.6 kernel with 1GB physical RAM, just minutes
ago), I was able to get a maximum heap size of 2687MiB and an initial
heap size of 100MiB. Attempting to repeat the same command (java
- -Xms100M -Xmx2687M [trivialclass]) failed, so the rules must be based
upon exactly what resources are available when the JVM starts.

Attempting to come anywhere close to 2687MiB with the initial heap size
was not possible. I tried looking for the largest heap size where
initial=maximum and I got 1815MiB as the largest I could muster. See
below for the (crude) script to determine this value.

- -chris

My script (note that MemoryInfo just dumps java.lang.Runtime's basic
memory information).

#!/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.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEUEARECAAYFAko3sUQACgkQ9CaO5/Lv0PBoCwCY9ZZWXyT4wBAb6Sv+f5t8pqpO
6ACfQNUPnWM+q32sYx07omOUi3m6MMQ=
=Y5Yu
-----END PGP SIGNATURE-----

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


RE: Tomcat JVM configuration

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Zeeshan Ahmad [mailto:zahmad@i2cinc.com]
> Subject: RE: Tomcat JVM configuration
> 
> It is possible if you will add the following parameters in the <Tomcat
> Home>/bin/catlina.sh
> 
> JAVA_OPTS="$JAVA_OPTS -Xms200M -Xmx2048M"

So after posting one completely wrong answer, you follow it up with another one...

The OP clearly stated this is for a 32-bit Windows platform.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Tomcat JVM configuration

Posted by André Warnier <aw...@ice-sa.com>.
Mark Thomas wrote:
> 
> Bzzz. Wrong. 
Someone's been watching a lot of TV gameshows.
Too bad there isn't an internet media type to convey this properly to 
the recipient.


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


Re: Tomcat JVM configuration

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Zeeshan,

On 6/16/2009 11:44 AM, Zeeshan Ahmad wrote:
> It is possible if you will add the following parameters in the <Tomcat
> Home>/bin/catlina.sh
> 
> JAVA_OPTS="$JAVA_OPTS -Xms200M -Xmx2048M"

Note that you have a smaller initial heap. The JVM may be willing to
start with a heap that is initially smaller than 2048MiB, but at some
point it will probably crash (and not with OOME... with something else
probably).

Try starting a JVM on a 32-bit platform like this:

java -Xms2048M -Xmx2048M [whateverclass]

... and see what happens. If you can find a hw/OS/JVM combo that works,
please post it (along with some non-forged output demonstrating that it
worked). We'll put it in the book of Amazing Facts.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAko4GR4ACgkQ9CaO5/Lv0PC90wCeLK/SLsTQZMHv8yhrdh9GMVJx
IL0AmwQO6u4bTY9mrAyDnLQkErn8LZln
=dwJv
-----END PGP SIGNATURE-----

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


RE: Tomcat JVM configuration

Posted by Zeeshan Ahmad <za...@i2cinc.com>.
It is possible if you will add the following parameters in the <Tomcat
Home>/bin/catlina.sh

JAVA_OPTS="$JAVA_OPTS -Xms200M -Xmx2048M"

Best Regards,
Zeeshan Ahmad.
Associate Manager SCM.
 
P Save a tree...pls don't print this e-mail unless necessary 

-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org] 
Sent: Tuesday, June 16, 2009 9:24 PM
To: Tomcat Users List
Subject: Re: Tomcat JVM configuration

Zeeshan Ahmad wrote:
> Sure,
> 
> You can assign Max Memory pool to 2048M or more, thanks.

Bzzz. Wrong. Not on that OS you can't. The other replies are correct.
You really need a 64-bit JVM.

Mark

> 
> Best Regards,
> Zeeshan Ahmad.
> -----Original Message-----
> From: Mehrotra, Anurag [mailto:amehrotra@telebright.com] 
> Sent: Tuesday, June 16, 2009 8:10 PM
> To: users@tomcat.apache.org
> Subject: Tomcat JVM configuration
> 
> My current setup: Windows Server 2003 on X86 (32bit).
> 
> Apache Tomcat 6.0.16
> 
> Apache Httpd server 2.059 with mod_jk
> 
> Using JVM 1.6.0_06 
> 
> 
> Current setting for the JVM used by tomcat is as follows: 
> Initial Memory pool -  768MB
> Max Memory pool - 1536MB
> 
> 
> Is there a way to go beyond 2GB for the max memory pool on the above
> platform? 
> 
> Would Unix allow me to allocate more memory to tomcat (JVM)?
> 
> Thanks,
> 
> 
>  ________________________________
> Anurag			301-296-3838
> 
> 
> The information contained in this message may be privileged and
> confidential and protected from disclosure.  If the reader of this
> message is not the intended recipient, or an employee or agent
> responsible for delivering this message to the intended recipient, you
> are hereby notified that any dissemination, distribution or copying of
> this communication is strictly prohibited. If you have received this
> communication in error, please notify us immediately by replying to the
> message and deleting it from your computer.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 



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


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


Re: Tomcat JVM configuration

Posted by Mark Thomas <ma...@apache.org>.
Zeeshan Ahmad wrote:
> Sure,
> 
> You can assign Max Memory pool to 2048M or more, thanks.

Bzzz. Wrong. Not on that OS you can't. The other replies are correct.
You really need a 64-bit JVM.

Mark

> 
> Best Regards,
> Zeeshan Ahmad.
> -----Original Message-----
> From: Mehrotra, Anurag [mailto:amehrotra@telebright.com] 
> Sent: Tuesday, June 16, 2009 8:10 PM
> To: users@tomcat.apache.org
> Subject: Tomcat JVM configuration
> 
> My current setup: Windows Server 2003 on X86 (32bit).
> 
> Apache Tomcat 6.0.16
> 
> Apache Httpd server 2.059 with mod_jk
> 
> Using JVM 1.6.0_06 
> 
> 
> Current setting for the JVM used by tomcat is as follows: 
> Initial Memory pool -  768MB
> Max Memory pool - 1536MB
> 
> 
> Is there a way to go beyond 2GB for the max memory pool on the above
> platform? 
> 
> Would Unix allow me to allocate more memory to tomcat (JVM)?
> 
> Thanks,
> 
> 
>  ________________________________
> Anurag			301-296-3838
> 
> 
> The information contained in this message may be privileged and
> confidential and protected from disclosure.  If the reader of this
> message is not the intended recipient, or an employee or agent
> responsible for delivering this message to the intended recipient, you
> are hereby notified that any dissemination, distribution or copying of
> this communication is strictly prohibited. If you have received this
> communication in error, please notify us immediately by replying to the
> message and deleting it from your computer.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 



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


RE: Tomcat JVM configuration

Posted by Zeeshan Ahmad <za...@i2cinc.com>.
Sure,

You can assign Max Memory pool to 2048M or more, thanks.

Best Regards,
Zeeshan Ahmad.
-----Original Message-----
From: Mehrotra, Anurag [mailto:amehrotra@telebright.com] 
Sent: Tuesday, June 16, 2009 8:10 PM
To: users@tomcat.apache.org
Subject: Tomcat JVM configuration

My current setup: Windows Server 2003 on X86 (32bit).

Apache Tomcat 6.0.16

Apache Httpd server 2.059 with mod_jk

Using JVM 1.6.0_06 


Current setting for the JVM used by tomcat is as follows: 
Initial Memory pool -  768MB
Max Memory pool - 1536MB


Is there a way to go beyond 2GB for the max memory pool on the above
platform? 

Would Unix allow me to allocate more memory to tomcat (JVM)?

Thanks,


 ________________________________
Anurag			301-296-3838


The information contained in this message may be privileged and
confidential and protected from disclosure.  If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to the
message and deleting it from your computer.


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


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