RE: Tomcat cluster tuning

2003-09-12 Thread Ralph Einfeldt
Sorry can't give a recommendation.

We had different results even for (nearly) the same
software for different sites. For one site the IBM JDK 
worked best, for the other Sun's.

Any given result may be wothless with the next version 
of either jdk. (Even with just changes in the minor 
revision)

You have to test that
- in your environment
- with your application
- with the expected behaviour of the users

Even small changes in one of these setting can change 
the result which jdk is better for you. (At least that's 
our experience)

 -Original Message-
 From: Cristopher Daniluk [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 11, 2003 7:04 PM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat cluster tuning
 
 
 Are there any recommendations for what JVM would work best?
 
 We're not doing anything fancy, so presumably any VM that works well
 with tomcat would work well for us. Are there any sites that 
 talk about
 the different JVM tuning options that affect Tomcat? I 
 haven't seen that
 many.
 

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



Tomcat cluster tuning

2003-09-11 Thread Cristopher Daniluk
We are runing a cluster of 3 apache servers and 2 tomcat servers
connected via AJP w/Oracle on backend.

The cluster has been performing very well but we've had a recent load
spike that's causing the tomcat servers to start swapping pretty
hardcore despite JVM limitations.

What is the -Xmx option limiting? Threads? Defined services? Instances
of Tomcat?

I would've thought that it would limit the entire tomcat instance, but
we have been far exceeding the 768mb limit we set.

We're connecting to Oracle on the back end via the JDBC thin client.
When the site starts swapping, performance on Oracle queries goes
exponentially downhill. A non-db page takes about 1 second to load
before swapping, vs 5 seconds to load when its swapping. On the other
hand, a db intensive page takes about 5 seconds to load normally, vs
about 40-50 seconds when it begins to swap. That number begins to crawl
quickly up until it exceeds the 5 minute max execution time and Tomcat
cuts the request off.

The servers are basically identically configured P1.8ghz machines with
1gb ram each. The connector line from server.xml is:

  Connector
className=org.apache.coyote.tomcat4.CoyoteConnector
port=8009 minProcessors=5 maxProcessors=100
enableLookups=true redirectPort=8443
acceptCount=100 debug=0 connectionTimeout=-1
 
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
/

And we're running Apache 2.0.47 w/mod_jk1 and AJP1.3. the
workers.properties is set to nonweighted balancing.

Are there any options to tune tomcat to reduce memory footpritn and to
let it queue more? We were initially running more maxProcessors but I
turned it down hoping to alleviate the congestion. Tried turning it up
thinking maybe the accept queue was the problem too, but that made it
worse.

Thanks,

Cris



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



RE: Tomcat cluster tuning

2003-09-11 Thread Ralph Einfeldt
mx is limiting the heap of a java process.

In other words:
It limits the total heap for one tomcat instance.

The total memory can be much higher:

- stacksize per thread
  Some vm's let you set these values (-Xss).
  If you have some hundred of threads that can make up some memory.

- static memory (like string constants, the code, ...)
  That pretty much defined at compile time.

- and may be further sorts of memories that depend on 
  the vendor and version of the jdk.

Regarding your config:

You can try to play with the combination of
maxProcessors
connectionTimeout
acceptCount

I'm not shure how the accepted but not processed 
request are handled (wether they are queued in one
thread, or if each has it's own thread)

There isn't much more you can change in tomcat.
The best recommendation I have is to find out where 
the memory comes from and either to cure the cause or
find out that you have to live with that memory usage
and spend more memory.

 -Original Message-
 From: Cristopher Daniluk [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 11, 2003 5:33 PM
 To: [EMAIL PROTECTED]
 Subject: Tomcat cluster tuning
 
 
 
 What is the -Xmx option limiting? Threads? Defined services? Instances
 of Tomcat?
 
 I would've thought that it would limit the entire tomcat instance, but
 we have been far exceeding the 768mb limit we set.
 
 
   Connector
 className=org.apache.coyote.tomcat4.CoyoteConnector
 port=8009 minProcessors=5 maxProcessors=100
 enableLookups=true redirectPort=8443
 acceptCount=100 debug=0 connectionTimeout=-1
  
 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
 /
 

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



RE: Tomcat cluster tuning

2003-09-11 Thread Cristopher Daniluk
Are there any recommendations for what JVM would work best?

We're not doing anything fancy, so presumably any VM that works well
with tomcat would work well for us. Are there any sites that talk about
the different JVM tuning options that affect Tomcat? I haven't seen that
many.

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 11, 2003 12:46 PM
To: Tomcat Users List
Subject: RE: Tomcat cluster tuning


mx is limiting the heap of a java process.

In other words:
It limits the total heap for one tomcat instance.

The total memory can be much higher:

- stacksize per thread
  Some vm's let you set these values (-Xss).
  If you have some hundred of threads that can make up some memory.

- static memory (like string constants, the code, ...)
  That pretty much defined at compile time.

- and may be further sorts of memories that depend on 
  the vendor and version of the jdk.

Regarding your config:

You can try to play with the combination of
   maxProcessors
   connectionTimeout
   acceptCount

I'm not shure how the accepted but not processed 
request are handled (wether they are queued in one
thread, or if each has it's own thread)

There isn't much more you can change in tomcat.
The best recommendation I have is to find out where 
the memory comes from and either to cure the cause or
find out that you have to live with that memory usage
and spend more memory.

 -Original Message-
 From: Cristopher Daniluk [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 11, 2003 5:33 PM
 To: [EMAIL PROTECTED]
 Subject: Tomcat cluster tuning
 
 
 
 What is the -Xmx option limiting? Threads? Defined services? 
Instances 
 of Tomcat?
 
 I would've thought that it would limit the entire tomcat 
instance, but 
 we have been far exceeding the 768mb limit we set.
 
 
   Connector 
 className=org.apache.coyote.tomcat4.CoyoteConnector
 port=8009 minProcessors=5 maxProcessors=100
 enableLookups=true redirectPort=8443
 acceptCount=100 debug=0 connectionTimeout=-1
  
 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
 /
 

-
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]