totoron
asked on
Tomcat - Run on Solaris Dual Processors
Hi Experts,
I am running apache as a web server and tomcat as the web container on a Solaris 9 with Dual Processors.
I noticed that my website only make sure of one processor.
Most of the time, processor 0 is always idle (100%) and processor 1 is very busyg(idle 0%).
Thus, my web site is very very slow.
I'd like to make full use of Dual Processors. So if any one is busy, I am hoping to off-load to another CPU.
1) Is there any thing that I must configure on tomcat?
2) Or I shall change my jsp&java programming?
Thank you
totoron
I am running apache as a web server and tomcat as the web container on a Solaris 9 with Dual Processors.
I noticed that my website only make sure of one processor.
Most of the time, processor 0 is always idle (100%) and processor 1 is very busyg(idle 0%).
Thus, my web site is very very slow.
I'd like to make full use of Dual Processors. So if any one is busy, I am hoping to off-load to another CPU.
1) Is there any thing that I must configure on tomcat?
2) Or I shall change my jsp&java programming?
Thank you
totoron
ASKER
thanks
i'm using jk connector (mod_jk-apache-2.0.55.so).
any recommendation for the fine tuning configuration?
i'm using jk connector (mod_jk-apache-2.0.55.so).
any recommendation for the fine tuning configuration?
to improve the performance of tomcat, Use a Thread Pool in your Connectors.
If you are using Tomcat 3.2 and above.
you can increase the performance of tomcat by changing the default setting for example
Pooled ajpv12 Connector
<!-- A pooled AJPV12 Connector for out-of-process operation -->
<Connector
className="org.apache.tomc at.service .PoolTcpCo nnector">
<Parameter
name="handler"
value="org.apache.tomcat.s ervice.con nector.Ajp 12Connecti onHandler" />
<Parameter
name="port"
value="8007"/>
</Connector>
Can be changed as
<!-- A pooled AJPV12 Connector for out-of-process operation -->
<Connector
className="org.apache.tomc at.service .PoolTcpCo nnector">
<Parameter
name="handler"
value="org.apache.tomcat.s ervice.con nector.Ajp 12Connecti onHandler" />
<Parameter
name="port"
value="8007"/>
<Parameter
name="max_threads"
value="30"/>
<Parameter
name="max_spare_threads"
value="20"/>
<Parameter
name="min_spare_threads"
value="5" />
</Connector>
As can be seen the pool has 3 configuration parameters:
max_threads - defines the upper bound to the for the concurrency, the
pool will not create more then this number of threads.
max_spare_threads - defines the maximum number of threads that the pool
will keep idle. If the number of idle threads passes the value of
max_spare_threads the pool will kill these threads.
min_spare_threads - the pool will try to make sure that at any time
there is at least this number of idle threads waiting for new requests
to arrive. min_spare_threads must be bigger then 0.
You should use the above parameters to adjust the pool behavior to your
needs.
i think so this would help in increasing the performance of tomcat
If you are using Tomcat 3.2 and above.
you can increase the performance of tomcat by changing the default setting for example
Pooled ajpv12 Connector
<!-- A pooled AJPV12 Connector for out-of-process operation -->
<Connector
className="org.apache.tomc
<Parameter
name="handler"
value="org.apache.tomcat.s
<Parameter
name="port"
value="8007"/>
</Connector>
Can be changed as
<!-- A pooled AJPV12 Connector for out-of-process operation -->
<Connector
className="org.apache.tomc
<Parameter
name="handler"
value="org.apache.tomcat.s
<Parameter
name="port"
value="8007"/>
<Parameter
name="max_threads"
value="30"/>
<Parameter
name="max_spare_threads"
value="20"/>
<Parameter
name="min_spare_threads"
value="5" />
</Connector>
As can be seen the pool has 3 configuration parameters:
max_threads - defines the upper bound to the for the concurrency, the
pool will not create more then this number of threads.
max_spare_threads - defines the maximum number of threads that the pool
will keep idle. If the number of idle threads passes the value of
max_spare_threads the pool will kill these threads.
min_spare_threads - the pool will try to make sure that at any time
there is at least this number of idle threads waiting for new requests
to arrive. min_spare_threads must be bigger then 0.
You should use the above parameters to adjust the pool behavior to your
needs.
i think so this would help in increasing the performance of tomcat
ASKER
thanks ss_p
so sorry...my mistakes...i'm using mod_jk and not mod_jk2.
i'm thinking of using the load balancer in my worker properties file...
but i've only one machine....load balancer will not work or help, am i right?
so sorry...my mistakes...i'm using mod_jk and not mod_jk2.
i'm thinking of using the load balancer in my worker properties file...
but i've only one machine....load balancer will not work or help, am i right?
yes you are correct.
but you can improve the performance of the tomcat. I think that it might help you in increase the performance.
but you can improve the performance of the tomcat. I think that it might help you in increase the performance.
ASKER
the mod_jk is using ajp13 port 8009.
my tomcat setting is
<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8443" debug="0"
minProcessors="5" maxProcessors="150"
protocol="AJP/1.3" />
How could i improve this?
my tomcat setting is
<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8443" debug="0"
minProcessors="5" maxProcessors="150"
protocol="AJP/1.3" />
How could i improve this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Have you got any answers.
http://www.cafesoft.com/products/cams/ps/docs21/admin/PerformanceTuning.html
after reading the above document, i guess one specific tweak u could try is probably allowing the Garbage COllector to run on a separate thread... using the
-XX:+UseParallelGC option
-KuTtZ