tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kenneth topp <cau...@prodigy.net>
Subject [tomcat-user] Re: Sun JDK 1.3.0 and multiple 'java' startups?
Date Wed, 25 Oct 2000 22:13:05 GMT

okay.. memory usage now.  3 things to note.

1) What you see is not what is happening (under unix).  Here is a
good general guide (although written as reference for GNOME project):

 http://mail.gnome.org/pipermail/gnome-list/1999-September/031795.html

2) Java allocates memory for it's own purposes (ie: for being it's own
cpu/os virtual thingy).  It's default heap can be large, although it tends
to be set small for x86 jvm's as vendors relieze that boxes average ~
128mb, and you don't want to set it too big.

3) now java's heap:  Imagine that you run your
virtual CPU in software, and your virtual CPU get's swapped by the OS,
then forget about any application running on the virtual CPU.. 

run :
 java -X

see: 
    -Xms<size>        set initial Java heap size
    -Xmx<size>        set maximum Java heap size

These values are critical for good performance.  If java process swaps
you're in big trouble.  I would think the OS needs to have hooks into
userspace for the jvm to handle swapping gracefully... No one seems to
mention this mess right now.

Anycase, just fyi..

Kenneth Topp

---
 to unsubscribe: tomcat-user-unsubscribe@jakarta.apache.org
 for more info: http://jakarta.apache.org/getinvolved/mail.html

On Wed, 25 Oct 2000, David Knaack wrote:

> From: "Paul Russell" <paul@luminas.co.uk>
> > On Wed, Oct 25, 2000 at 03:15:51PM -0500, David Knaack wrote:
> > > From: "David Knaack" <dknaack@rdtech.com>
> > > > I'm running Tomcat 3.1 with several virtual hosts, and
> > > > with Sun's JDK1.2.2 I had no problems.  
> > > Oops, I should mention that I'm running on RedHat 6.2.
> > 
> > Heh. In which case, don't panic. Linux reports each thread
> > as a separate process, when in fact threads in linux are
> > incredibly light. Memory also seems to be massivly misreported,
> 
> Kind of looks like the threads are reported as using the
> same resources as the parent, so each set of 11 related
> java threads all report ~12Mb used, (summing to over
> 130Mb), when the correct figure is actually closer to 12Mb
> total?
> 
> Interesting, someone ought to fix that.
> 
> > Look at the amount of ram *free* on
> > the server, if that is low, it might be worth upgrading it...
> 
> Well, 'free' reports the following:
> 
> <5 tomcats up for ~20 hours, light load>
>              total       used       free     
> Mem:        127908     120840       7068     
> Swap:       232900       8360     224540
> <./tomcat all stop>
> Mem:        127908      73488      54420   
> Swap:       232900       7776     225124
> <./tomcat all start>
> Mem:        127908     104380      23528    
> Swap:       232900       7776     225124
> <hit each site once>
> Mem:        127908     111984      15924   
> Swap:       232900       7752     225148
> 
> So it looks like under normal circumstances I'm running
> pretty light on real memory, but next to nothing has
> been swapped out.  I guess thats good?
> 
> Thanks for the assistance!
> DK
> 


Mime
View raw message