You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ian H <su...@gmail.com> on 2007/05/08 20:11:38 UTC

Error when increasing Tomcat's maximum memory pool

I have Tomcat 5.5 running on a Windows 2000 machine having 4GB of RAM
(recently upgraded from 2GB).  The JVM in place is 1.4.2_12.

Using the "Configure tomcat" widget, I attempted to increase the
maximum memory pool from 1280MB that had been working to 2560MB.  At
this point, Tomcat fails to start, with these errors showing up in the
jakarta log:

  JNI Error occurred during initialization of VM
  JNI Could not reserve enough space for object heap

Googling around, I've only found that there seems to be a limit which
varies based on the flavour of the components in an installation,
typically ranging from around 1700MB to 2GB...I have yet to find
anything comprehensive detailing these limitations, however.

That being said, with its current configuration, Tomcat will only
start on my system with the maximum pool capped at 1344MB...anything
higher than this and it fails.

Does anyone have any suggestions regarding how to diagnose what's
limiting this, or suggestions for increasing it?

Thank you very much,

- Ian

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


RE: Error when increasing Tomcat's maximum memory pool

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Ian H [mailto:sum.of.primes@gmail.com] 
> Subject: Re: Error when increasing Tomcat's maximum memory pool
> 
> - the maximum memory available for allocation for the pool will depend
> on the amount of contiguous memory that's available to be allocated

It's the amount of contiguous virtual memory available, after Windows
has scettered code segments and DLLs all over it.

> - on a W2K box with 4GB of RAM, we will likely have, by default, 2GB
> earmarked for the OS, and 2GB for applications (seriously cutting into
> what would be contiguous and available for the pool)

The amount of installed RAM has nothing to do with the amount of virtual
space allocated to the OS and each process.  If you have a large enough
paging file and a lot of patience, you can run a Windows system with
much less than 1 GB of RAM and still have 2 GB of virtual space for each
process and 2 GB for the OS.  (It would run like crap, of course.)

> - on W2K Enterprise or Datacenter editions, you could opt to start
> with the /3GB switch and shift the allocation to 1GB/3GB for os/apps,
> respectively, increasing the likelihood of more contiguous space being
> available for the heap

Correct.  But again, that's 3 GB per process, not total for all
processes.

> [Regarding the /3GB switch not being recommended on W2K Standard
> Edition: does anyone have direct experience with this configuration
> and Tomcat as relates to stability, etc.?]

Sorry, I don't know if the standard W2K even looks for this option.  The
impact it has on the OS is less room for internal data structures;
Tomcat won't know the difference.

> - given the hypothetical scenario that more contiguous space has
> mysteriously been achieved for allocation (via choosing a different
> hardware architecture or what have you) -- does Tomcat 5.5 still have
> the 2GB limit I've heard mentioned?

The limit has nothing to do with Tomcat, but with the JVM.  Some levels
of 32-bit JVMs didn't handle address ranges of more than 2 GB due to
sign-extension problems.  I haven't checked to see if that problem has
been fixed in Sun's current 32-bit JVM.  It's not a problem in 64-bit
JVMs, of course.

> Are there any guidelines to go by regarding how much of a
> tradeoff there will be for the extra burden related to garbage
> collection with larger heaps, or is it a matter of "test and see"?

You'll have to test and see to be sure.  Typically, for a given
workload, the total heap size has little effect on the time a single GC
takes, but it does affect the frequency of GCs.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error when increasing Tomcat's maximum memory pool

Posted by Ian H <su...@gmail.com>.
Thanks again, both Filip & Chuck,

Is this interpretation of the information out there correct:
- the maximum memory available for allocation for the pool will depend
on the amount of contiguous memory that's available to be allocated
- on a W2K box with 4GB of RAM, we will likely have, by default, 2GB
earmarked for the OS, and 2GB for applications (seriously cutting into
what would be contiguous and available for the pool)
- on W2K Enterprise or Datacenter editions, you could opt to start
with the /3GB switch and shift the allocation to 1GB/3GB for os/apps,
respectively, increasing the likelihood of more contiguous space being
available for the heap
[Regarding the /3GB switch not being recommended on W2K Standard
Edition: does anyone have direct experience with this configuration
and Tomcat as relates to stability, etc.?]

- given the hypothetical scenario that more contiguous space has
mysteriously been achieved for allocation (via choosing a different
hardware architecture or what have you) -- does Tomcat 5.5 still have
the 2GB limit I've heard mentioned?  Do newer versions still have this
limitation?  Are there any guidelines to go by regarding how much of a
tradeoff there will be for the extra burden related to garbage
collection with larger heaps, or is it a matter of "test and see"?

Thanks again,

- Ian


On 5/8/07, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
> 32 bit limitations, the entire process heap is around 2GB, leaving you
> with the number you found for the java heap
>
> Filip
>
> Ian H wrote:
> > I have Tomcat 5.5 running on a Windows 2000 machine having 4GB of RAM
> > (recently upgraded from 2GB).  The JVM in place is 1.4.2_12.
> >
> > Using the "Configure tomcat" widget, I attempted to increase the
> > maximum memory pool from 1280MB that had been working to 2560MB.  At
> > this point, Tomcat fails to start, with these errors showing up in the
> > jakarta log:
> >
> >  JNI Error occurred during initialization of VM
> >  JNI Could not reserve enough space for object heap
> >
> > Googling around, I've only found that there seems to be a limit which
> > varies based on the flavour of the components in an installation,
> > typically ranging from around 1700MB to 2GB...I have yet to find
> > anything comprehensive detailing these limitations, however.
> >
> > That being said, with its current configuration, Tomcat will only
> > start on my system with the maximum pool capped at 1344MB...anything
> > higher than this and it fails.
> >
> > Does anyone have any suggestions regarding how to diagnose what's
> > limiting this, or suggestions for increasing it?
> >
> > Thank you very much,
> >
> > - Ian

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


Re: Error when increasing Tomcat's maximum memory pool

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
32 bit limitations, the entire process heap is around 2GB, leaving you 
with the number you found for the java heap

Filip

Ian H wrote:
> I have Tomcat 5.5 running on a Windows 2000 machine having 4GB of RAM
> (recently upgraded from 2GB).  The JVM in place is 1.4.2_12.
>
> Using the "Configure tomcat" widget, I attempted to increase the
> maximum memory pool from 1280MB that had been working to 2560MB.  At
> this point, Tomcat fails to start, with these errors showing up in the
> jakarta log:
>
>  JNI Error occurred during initialization of VM
>  JNI Could not reserve enough space for object heap
>
> Googling around, I've only found that there seems to be a limit which
> varies based on the flavour of the components in an installation,
> typically ranging from around 1700MB to 2GB...I have yet to find
> anything comprehensive detailing these limitations, however.
>
> That being said, with its current configuration, Tomcat will only
> start on my system with the maximum pool capped at 1344MB...anything
> higher than this and it fails.
>
> Does anyone have any suggestions regarding how to diagnose what's
> limiting this, or suggestions for increasing it?
>
> Thank you very much,
>
> - Ian
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>


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


Re: Error when increasing Tomcat's maximum memory pool

Posted by Ian H <su...@gmail.com>.
Awesome, thank you again Chuck!

- Ian

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


RE: Error when increasing Tomcat's maximum memory pool

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Ian H [mailto:sum.of.primes@gmail.com] 
> Subject: Error when increasing Tomcat's maximum memory pool
> 
> I have Tomcat 5.5 running on a Windows 2000 machine having 4GB of RAM
> (recently upgraded from 2GB).  The JVM in place is 1.4.2_12.
> 
> That being said, with its current configuration, Tomcat will only
> start on my system with the maximum pool capped at 1344MB...anything
> higher than this and it fails.

This situation is discussed several times a year on this mailing list.
Try looking at this thread for an explanation:
http://marc.info/?t=109189645900005&r=1&w=2

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org