[Prev] Thread [Next]  |  [Prev] Date [Next]

RE: Free Memory vs. Total Memory vs. Max Memory Robinson, Eric Sat Feb 18 05:00:30 2012

> Robinson, Eric wrote:
> >> We have many servers that have been running 100-200 instances of 
> >> tomcat each for years without any performance problems.
> >> Most of our servers are Linux 8-core machines with 32GB 
> RAM, with the 
> >> tomcat instances configured with -Xms16M -Xmx192M.
> >> We also have some Windows servers with 100-150 instances of tomcat 
> >> each, most of which are configured with -Xms16M -Xmx64M.
> >>
> > 
> > To add to the above, we see zero swapping and very low 
> iowait (or disk
> > queue lengths in Windows).
> > 
> You would have saved everyone some time by being a little bit 
> more forward with the above.
> Your initial question sounded deceptively beginner-like, 
> which is why you got beginner 
> treatment.

Sorry about that. Regardless of the number of tomcats we run
(approximately 1000) I still think of myself as a tomcat beginner. :-)
Also, I was trying to avoid poisoning the well so I kept the facts to a

> Thanks for sharing the data above in any case.  It provides a 
> future reference point for 
> similar enquiries.
> Anyway, it sounds like you have at least the possibility of 
> getting plenty of real-world 
> data to confirm or disprove you thesis.  Just enabling GC 
> logging at the minimum level on 
> that instance should be enough to provide a good impression 
> of what's going on at 
> different settings of Heap size.

I'll do that.

> Unless you also know the exact applications and usage of that 
> instance, you may still be 
> surprised.
> I also administer a number of Tomcat instances, usually 
> running one single and in 
> principle smallish application, always the same, each Tomcat 
> being alone on one of a 
> similar set of (Linux) servers.  In most cases, 128 MB Heap 
> is enough and we never see a 
> problem.  In a couple of cases however, 512MB Heap is the 
> absolute minimum to provide 
> acceptable user-perceived performance.  

Understood. We also have a small percentage of instances that require
384M, and a couple that require 512M. But even with those, I set
-Xms16M. And that's really where I get to the core of my question. In my
view, it only takes a few microseconds for the instance to allocate more
RAM if it is required. I really don't see a downside. More imporetantly,
I don't see how setting a low initial pool would cause a thread to

>The difference is not 
> so much in the absolute 
> number of users or requests, but in the pattern of usage 
> during the day.  Our favored 
> hypothesis is that several hundred employees always return 
> from their coffee breaks at 
> exactly the same time.
> Just to say that you never know until you measure.

Agreed. Anyway, in this case the thread is on a tomcat server that is
only used for scheduled java tasks. Users do not access it directly.
Very puzzling. What's I'd really like is for some well-known tomcat guru
to say that in our environment, -Xms16M is fine and that the assertion
that a low -Xms value could result in memory shortages at runtime or
thread freezes is silly. One can hope.


Disclaimer - February 18, 2012 
This email and any files transmitted with it are confidential and intended 
solely for Tomcat Users List. If you are not the named addressee you should not 
disseminate, distribute, copy or alter this email. Any views or opinions 
presented in this email are solely those of the author and might not represent 
those of Physicians' Managed Care or Physician Select Management. Warning: 
Although Physicians' Managed Care or Physician Select Management has taken 
reasonable precautions to ensure no viruses are present in this email, the 
company cannot accept responsibility for any loss or damage arising from the 
use of this email or attachments. 
This disclaimer was added by Policy Patrol: http://www.policypatrol.com/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]