tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Tomcat unexpectedly shuts down
Date Mon, 09 Aug 2010 22:20:10 GMT
Gerardo Corro wrote:
> What would be the minimum memory needed by OS in order to have jvm/tomcat running properly?
> Our system will grow five times more and we were thinking to get a total of 20GB ram
memory, we were planning to assign 18GB to jvm/tomcat and leave 2Gb to the OS.
> Is there a kind of rule for jvm-tomcat/os memory proportions needed?
There is no rule, but there was an earlier thread on this list with the message I quote 
below, which provides an idea of how many distinct instances of Tomcat one /can/ run in 
one machine with 32 GB of RAM. Divide by 164 to figure out how much memory one Tomcat 
/might/ need.  You may want to read the whole thread in the list archives there is 
probably some information for you there.

Apart from that, I run a number of Linux servers with Tomcat (mostly 5.5 right now) and 
the following "top" display if fairly typical.

top - 00:11:51 up 223 days, 13:58,  2 users,  load average: 0.07, 0.02, 0.00
Tasks: 133 total,   1 running, 132 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.2%us,  0.0%sy,  0.0%ni, 99.5%id,  0.3%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   2054392k total,  1986820k used,    67572k free,   114660k buffers
Swap:  1951888k total,    58548k used,  1893340k free,  1027228k cached

  3030 tomcat55  20   0  420m 162m 9168 S    0  8.1  73:22.22 java

The (32-bit) JVM of this particular Tomcat is configured with options "-Xms128M -Xmx128M"

in other words with a fixed size Heap of 128 MB.  This is on a not-so-fast machine with 2

GB RAM in total, which runs plenty of other things.

I must say that your 3000 MB of Heap kind of makes my head spin.  What kind of application

are you running that you would think you need as much ?

-------- Original Message --------
Subject: RE: Tomcat Shutting Down by Itself?
Date: Mon, 26 Jul 2010 21:35:03 -0700
From: Robinson, Eric <>
Reply-To: Tomcat Users List <>
To: Tomcat Users List <>

 > What kind of machine are you running these 163/164
 > instances of Tomcat on, and when you are running them,
 > what /does/ "free" say ?

I have two different servers with 164 instances of tomcat. Both servers
have 2x quad-core 2.8Ghz Xeon processors with 32GB RAM. On the first
server (app03), most instances of tomcat are configured with 64MB of
Java heap. About 20% of them have 96-256MB. I almost never reboot this
server (current uptime 61 days). Here's 'free' from app03.

[root@app03 ~]# free
              total       used       free     shared    buffers
Mem:      33265832   30570260    2695572          0     296976
-/+ buffers/cache:   25710500    7555332
Swap:      2031608          0    2031608

On the other server (app04), all instances of tomcat are configured with
512MB Java heap (-ms512M -mx512M). After 4 or 5 days of uptime, the
server starts to swap a little. Then I reboot it and it is fine for
several more days. As you can see from the following, it is about time
for a reboot. If I do not reboot it tonight, by tomorrow or the next day
it may be up to 1-2GB of swap. (It actually doesn't slow the server down
much though. sar shows that it runs about 90% idle anyway, including

[root@app03 ~]# ssh app04 free
              total       used       free     shared    buffers
Mem:      33265832   32965812     300020          0     191248
-/+ buffers/cache:   28932472    4333360
Swap:      2031608       4288    2027320

Eric Robinson

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message