wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Tomcat Memory Usage too Large(Urgent!!!) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat Memory Usage too Large(Urgent!!!)" Watch "Tomcat Memory Usage too Large(Urgent!!!)" New topic
Author

Tomcat Memory Usage too Large(Urgent!!!)

Dorj Galaa
Ranch Hand

Joined: May 29, 2001
Posts: 113
Hello all
Here is part of top output. Is it usual that java
processes eat all of memory? ? At now there are 50 java processes started that running tomcat andeach of them uses 59M memory. There is running apache
server with
tomcat 4 and mysql. OS is Redhat7.2 x86 . JDK 1.4 is installed.
how to solve this problem?
106 processes: 105 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: 0.3% user, 3.4% system, 0.0% nice, 96.1% idle
Mem: 1028860K av, 1022352K used, 6508K free, 116K shrd, 129004K buff
wap: 1020116K av, 0K used, 1020116K free 762320K cached
3201 root 9 0 60692 59M 28164 S 0.0 5.8 0:03 java
3202 root 8 0 60692 59M 28164 S 0.0 5.8 0:00 java
3203 root 9 0 60692 59M 28164 S 0.0 5.8 0:35 java
3204 root 9 0 60692 59M 28164 S 0.0 5.8 0:00 java
3205 root 9 0 60692 59M 28164 S 0.0 5.8 0:01 java
3206 root 9 0 60692 59M 28164 S 0.0 5.8 0:00 java
3207 root 9 0 60692 59M 28164 S 0.0 5.8 0:00 java
3208 root 9 0 60692 59M 28164 S 0.0 5.8 0:00 java
3209 root 9 0 60692 59M 28164 S 0.0 5.8 0:03 java


Senior software engineer
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
Hi - is this system running slowly?
Or are you just excited by the numbers you see?
You have 1,028,860K of physical RAM. That is appx 1G, or 1,000+Mb.
According to your calculations, you have 50 processes (we of course do not see all of them)at 59M each (from the 'RSS' column of top).
That means a total of 50 * 59Mb = 2,950Mb of code, data, and stack space.
Well, clearly 2,950Mb > 1,000+Mb.
Yet you are doing absolutely no swapping (appx 1G swap, nothing used).
So what is happening to all that physical memory requirement??
I think the key is in the explanation for 'RSS' in the man page. It says that:
For ELF processes, library pages are counted here

Tha real java executables are ELF modules.
And I think the library pages are shared across processes (Note that this kind of sharing is different than that shown in the 'SHARE' column of top output).
And it implies that the 'RSS' column number is really of dubious value.
Please .. anyone here who knows more about Linux than I, please feel free to kick my butt on this if I am wrong.
Regards, Guy
P.S. for the moderators - this might do better in Linux or TC forums.
[ March 11, 2002: Message edited by: Guy Allard ]
Dorj Galaa
Ranch Hand

Joined: May 29, 2001
Posts: 113
all 16 processes
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Moving from Servlets -> Apache/Tomcat
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat Memory Usage too Large(Urgent!!!)