If that's a typical snapshop of the system load
you havn't any of this problems:

- Memory usage
  As others have pointed out, you have plenty of memory
  (Compared to the need of 2 instances of tomcat with 
   80 to 130MB each)
- CPU Usage
  Both CPU's are idle at over 80 percent. (They are 
  mainly doing nothing) The load also indicates that
  the system is mainly doing nothing.

What may have:

- An application that sits on thread or database locks and is 
  waiting for them to be released (maybe even a deadlock)
- Some external problem:
  - dns lookups don't work
    each request is delayed until a dns lookup timeout occurs.
    (Disable dnslookups)
  - obscure routing to a database server
    each request to the database is routed on strange paths
    to be answered. (Have seen configurations where the request
    where routed over the internet to reach a lokal database)
- Maybe IO Problems
  The iostate is not shown in the top output.
  (This problem is very unlikely, as this would also influence
  the load numbers)

You have to find out what is causing the performance degration.

You might find following tools usefull to do that:

OS related tools:
  - vmstat
  - iostat
  - netstat
  - strace

java related tools:
  - OptimizeIt
  - JProbe
  - HPJmeter http://www.hp.com/products1/unix/java/hpjmeter/
  - enablic verbose gc in the vm
  - Try to trim down the smallest example webapp that exposes 
    the problem.
    Try to find out where the time is used. (Measure the time
    between a request in the apache accesslog and the corresponding 
    call of the servlet) if the time is spnt in the servlet/jsp
    include additional log statements to find out where in the 
    servlet the problem is caused)
    If that doesn't help post the example to the list.
  - Debugger

It's not in the scope of this list to go in more detail for this tools.
But maybe some links may help you to get a start:
http://www-106.ibm.com/developerworks/library/i-tuning/?dwzone=ibm
http://www.linuxdevcenter.com/lpt/a/272







BTW: JAVA_OPST is misspelled (should be JAVA_OPTS)
40m is a quite low value for the memory setting.



> -----Original Message-----
> From: software [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 27, 2004 7:02 PM
> To: Tomcat Users List
> Subject: Re: Help tomcat problem with memory
> Importance: High
> 
> 
> Hi this  the statemens that i posted in the catalina.sh file
> JAVA_HOME=/usr/java/j2sdk1.4.0 ; export JAVA_HOME
> CATALINA_HOME=/usr/local/tomcat1 ; export CATALINA_HOME
> JAVA_OPST="-server -Xms30m -Xmx40m -Dfile.encoding=ISO-8859-1"
> CATALINA_OPTS="-Xms30m -Xmx40m"
> 
> This the output of the top command and both tomcats has been 
> installed 
> in the same server
> 
> 1:22pm  up 21 days,  5:36,  6 users,  load average: 0.17, 0.23, 0.28
> 220 processes: 218 sleeping, 2 running, 0 zombie, 0 stopped
> CPU0 states:  9.5% user,  4.0% system,  0.0% nice, 85.5% idle
> CPU1 states:  7.4% user,  8.5% system,  0.4% nice, 83.3% idle
> Mem:  1030580K av, 1019220K used,   11360K free,       0K 
> shrd,   92348K 
> buff
> Swap: 2096376K av,   58748K used, 2037628K free               
>    706776K 
> cached
> 
>   PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
> 23447 root      25   0 86252  84M 18864 S     0.0  8.3   0:02 java
> 23461 root      15   0 86252  84M 18864 S     0.0  8.3   0:00 java
> 23462 root      15   0 86252  84M 18864 S     0.0  8.3   0:03 java
> 23463 root      15   0 86252  84M 18864 S     0.0  8.3   0:00 java
> 23464 root      15   0 86252  84M 18864 S     0.0  8.3   0:00 java
> 23474 root      15   0 86252  84M 18864 S     0.5  8.3   0:03 java
> 23475 root      20   0 86252  84M 18864 S     0.0  8.3   0:00 java
> 23476 root      20   0 86252  84M 18864 S     0.0  8.3   0:00 java
> 
> 
> Ralph Einfeldt wrote:
> 
> >To what value did you set -Xms, -Xmm ?
> >Can you post the statement that sets the values ?
> >(Have seen to much typos in the past)
> >How much memory has your box ?
> >
> >What says the cpu load ?
> >
> >Can you post the head of the top output
> >hat shows the overall memory usage ?
> >
> >Are both tomcat instances on the same server ?
> >
> >Unless you have less than ~150 MB RAM I wouldn't 
> >expect that the memory usage is the problem if
> >each tomcat has it's own server, if they share the 
> >same server the box would need rougly 300 MB 
> >(Depending on how much memory is used by other 
> >processes)
> >
> >Remember that all threads of the same vm share 
> >their memory.
> >
> >  
> >
> >>-----Original Message-----
> >>From: software [mailto:[EMAIL PROTECTED]
> >>Sent: Friday, February 27, 2004 6:07 PM
> >>To: Tomcat Users List
> >>Subject: Re: Help tomcat problem with memory
> >>Importance: High
> >>
> >>
> >>Yes i've configured the Tomcat environment -Xms, -Xmm but i 
> think it 
> >>doesn't work, because it's consume the server memory until 
> 145 Mb per 
> >>process i need to limit the number of java proccess and the 
> >>memory that they consume on my Linux Red Hat 7.3  server
> >>
> >>thanks a lot
> >>fabian
> >>
> >>Ralph Einfeldt wrote:
> >>
> >>    
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >  
> >
> 

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

Reply via email to