LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-30-2007, 06:06 AM   #1
veenaonnet
LQ Newbie
 
Registered: May 2006
Posts: 6

Rep: Reputation: 0
Tomcat memory usage on Linux


Hello,

I am running data intensive application on CentOS with tomcat 5.5, jdk1.5 and My Sql. I found that after running some JSPs , if I keep the system idle for some time memory usage readings are not coming down. To check if it a code problem, I created application with simple login functionality(Simple JSP and servlet) and tried to note memory usage on CentOS(rss readings) and Windows.

I found that, in Linux usage goes up upto certain limit, but after this if I keep system idle still this memory reading is not coming down. While in windows it comes down after some time.

Is there any setting for garbage collection? Exactly what should I do to resolve this issue? Because on production system if I load test the application it starts using swap memory and eventually tomcat hangs.

Thanks.

Regards,
Veena
 
Old 05-31-2007, 01:43 AM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 151Reputation: 151
EDIT: Sorry, I should have read the last part of your post about Tomcat hanging...

Can you post the output of free and ps (or top) so that we can see what is happening with your processes?

Also, have a look at http://gentoo-wiki.com/FAQ_Linux_Memory_Management for more info, Linux doesn't manage memory the same way that Windows does.

Last edited by gilead; 05-31-2007 at 01:45 AM.
 
Old 05-31-2007, 03:19 AM   #3
veenaonnet
LQ Newbie
 
Registered: May 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Tomcat memory usage on Linux

Hi,

Thanks for your reply. Following are the ps readings for "Java" process when I run simple Login application. If you need, I will also post actual application reading but it shows the same increase pattern.

My concern is
1. why it is increasing though server is idle
2. Why it never comes down? (Is it due to caching? and if it so what should be done in production server?)

Scenario
while starting tomcat
25464
28788
29512
31960
32804
32804
32804
Tomcat Started and run application with one browser
33656
33656
33656
41496
41496
After some time, running application continuosly
41512
41512
41512
41516
41516
40964
40964
40964
40968
40968
40968
40968
40968
40968
40968
40968
Run for 2nd time
40980
40980
40980
40980
40980
Run for 3rd time
40980
40980
40980
40980
40980
40980
40980
Run for 4th time
40980
40980
40980
41008
41008
41776
41776
41776
41776
Kept idle for 10mins
41780
41780
41780
41780
41780
Run for fifth time
41784
Kept idle for 20mins
41224
and again it increases of remain constant but never decreases.

Regards,
Veena
 
Old 05-31-2007, 03:35 AM   #4
veenaonnet
LQ Newbie
 
Registered: May 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Tomcat memory usage on Linux

Hi,

Just as an information, I have 1GB memory on CentOS production server and I have set tomcat heap size to 512 MB. Is 1 GB RAM fine for data intensive application?

Regards,
Veena
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory Usage on Linux lchand_p Linux - Software 2 06-19-2006 06:17 AM
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 08:43 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
Linux Memory usage Boomba Linux - General 8 03-25-2004 04:16 PM
Linux and Memory usage ganninu Linux - General 8 12-15-2003 07:33 AM


All times are GMT -5. The time now is 12:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration