I am trying to understand the relationship between applications in Tomcat,
the number of Tomcat processes, Apache mod_jk and the number of threads.

For instance on a system I have the following
Apache 1.3.28, Tomcat 4.1.27, Java 1.4.2_02
I use the follow commands to see what is listening to different ports to get
an idea of what process or threads are running.
Apache: lsof -i tcp:80 | wc -l
This gives me 12 processes listening to port 80 (I checked these are related
to the number of Apache instances)

Tomcat direct port: lsof -i tcp:8080 | wc -l
This gives me 50 process that also correspond to the number of tomcat
instances running(i.e. the number of java instances I see in ps )

Tomcat mod_jk port:
lsof -i tcp:8009 | wc -l
gives me 550

I have included my condensed jk.properties and workers.properties files at
the end if that may help.
Now I now that these numbers will change depending on load but I am trying
to understand the relationship.

So my questions is how do the numbers relate to each other?
How does this effect performance?
How could I tune these numbers?

Now I have a vague understanding of how these relate but the numbers don't
add up for me. I have read the docs and searched for quite a while for a
better description.

Thanks

FILE: jk.properties
############################################################################
#######
LoadModule jk_module libexec/mod_jk.so
JkWorkersFile /usr/local/tomcat/conf/workers.properties
JkLogFile /usr/local/tomcat/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %U %T %b"

## /examples1
Alias /examples1 /usr/local/tomcat/webapps/examples1
<Location "/examples1/WEB-INF/">
AllowOverride None
deny from all
</Location>
JkMount /examples1/* worker1

## /ctrials
Alias /ctrials /usr/local/tomcat/webapps/ctrials
<Location "/ctrials/WEB-INF/">
AllowOverride None
deny from all
</Location>
JkMount /ctrials/* worker1

## /syndication
Alias /syndication /usr/local/tomcat/webapps/syndication
<Location "/syndication/WEB-INF/">
AllowOverride None
deny from all
</Location>
JkMount /syndication/* worker1

## /fellowship
Alias /fellowship /usr/local/tomcat/webapps/fellowship
<Location "/fellowship/WEB-INF/">
AllowOverride None
deny from all
</Location>
JkMount /fellowship/* worker1

## /test
Alias /test /usr/local/tomcat/webapps/test
<Location "/test/WEB-INF/">
AllowOverride None
deny from all
</Location>
JkMount /test/* worker1

# All jsp go to worker1
JkMount /*.jsp worker1
# All servlets goes to worker1
JkMount /*/servlet/ worker1

############################################################################
##

FILE: workers.properties
############################################################################
##
# Define some properties
workers.apache_log=/usr/local/apache/logs/
workers.tomcat_home=/usr/local/tomcat
workers.java_home=/usr/local/java/
ps=/

# Define workers
worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=1
#worker.worker1.cachesize=10
#worker.worker1.cache_timeout=300
worker.worker1.socket_keepalive=1
worker.worker1.socket_timeout=300

# how many ms to wait for PONG after sending a PING for connection
worker.worker1.connect_timeout=2000
# how many ms to wait for PONG after sending a PING before posting data
worker.worker1.prepost_timeout=2000
# how long to wait for a reply after sending data before server considers
connection dead
worker.worker1.reply_timeout=1800000

############################################################################
##


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

Reply via email to