Rainer Jung wrote:
<IfModule mpm_worker_module>
   StartServers          2
   MaxClients          256
   MinSpareThreads      25
   MaxSpareThreads      75
   ThreadsPerChild      32

Usually MinSpaceThreads and MaxSpareThreads having a multiple of
ThreadsPerChild makes it easier understandable, what the numbers mean.
Scaling up and down is always done in increments of processes, each
having ThreadsPerChild threads.

OK.  I changed MinSpareThreads to 32 and MaxSpareThreads to 96
and left the others as is.
workers.properties:

worker.tomcat1.type=ajp13
worker.tomcat1.host=127.0.0.2
worker.tomcat1.port=8009
worker.tomcat1.connection_pool_size=150

Delete the connection_pool_size.

Done.

worker.tomcat1.connection_pool_timeout=600

you need to set connectionTimeout for the Tomcat connector to 600000 then.

Done.


server.xml:

<Connector port="8009"
              protocol="AJP/1.3"
              address="127.0.0.2"
              redirectPort="443"
              maxThreads="150" />

The 150 threads do not make a good fit to your MaxClients of 256.

Increased to 256 to match MaxClients.

I'm going to be hit with a traffic storm (many thousands
of simultaneous connection attempts in a few minutes) in a few days, and
I'm thinking I should make sure I've got this right.

You need to do stress testing in order to find out, what the correct
sizing is. If your application can stand the load and is very
fast/lightweight, then you could manage more than 1000 requests/second
with three Tomcats without ever reaching 256 MaxClients per Apache. If
your application gets slow, then you might not be able to server 50
requests/second. Play around with the above formula.

Not sure what the "correct" sizing is yet.  However, we got the storm today
and all went well.  At one point "ipvsadm -L -persistent-conn" was reporting
active connections in the 250-300 range and over 1500 inactive connections
for all three servers.  Nothing broke.

The web servers never seemed to be heavily loaded.  Only one of the three
ever had a load average over 1.  The database was loaded but not to the
point of being scary.  Obviously, I've still got some homework to do.

Thank you so much for your help.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to