On 19/12/2011 19:41, Leon Rosenberg wrote:
> Do a simple math. If you give each VM up to 384M heap and if you add
> some 100 MB for permspace and overhead, you have a consumption of
> 500MB per VM. 

Agreed.  Object heap != total process usage.

> Take 1GB for OS needs, you have 15, and 15.000/500 makes
> it save to run 30 tomcat instances max.
> Since you experience the problems after some running time, I would
> assume that you VMs are starting with 128 but slowly take up all the
> space, and the later VMs just have nothing to get.

Is the OP monitoring the JVM memory consumption (via a JMX connection)?

> Advice: Calculate your needs exactly by playing with settings
> (remember always set Ms=Mx) and watching gc logs. You will probably
> need to reduce the number of instances or buy another machine (or put
> more memory into this one).

It would be useful to establish what is consuming memory once Tomcat
instances have failed.  Is it failed JVM instances that have hung and
are still consuming memory, or is it something more exotic to do with
the hypervisor?

Fixing memory size will offer some gains, but you need to understand
what each instance is actually doing, rather than using a standard.

> Also, do you really need a separate instance for each webapp? You have
> 60x catalina code in the heap and everything, which probably takes
> half of your memory.

I don't think it's safe to say "catalina code will take half your
memory", given that we don't know anything about the OPs apps, but it
may be a reasonable gain to collapse some apps into one Tomcat.


p


> regards
> Leon
> 
> 
> On Mon, Dec 19, 2011 at 8:24 PM, Caldarale, Charles R
> <chuck.caldar...@unisys.com> wrote:
>>> From: Robinson, Eric [mailto:eric.robin...@psmnv.com]
>>> Subject: Do I Have Java Memory Fragmentation?
>>
>>> All of this makes me think we have a problem with Java memory
>>> fragmentation because of having so many instances of Java
>>
>> Fragmentation doesn't really exist anymore, thanks to paging and garbage 
>> collection.  (Except in very unusual circumstances involving badly coded JNI 
>> methods that pin objects unnecessarily; are you doing that?)
>>
>>> Can someone recommend a way to diagnose and/or fix this problem?
>>
>> Look in the Windows logs (event viewer), not the Tomcat ones.  Windows may 
>> think you're running out of memory + swap space.  Raising the -Xmx value for 
>> each Tomcat instance will only make it worse, not better.
>>
>>  - 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-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-- 

[key:62590808]

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to