Hello folks,
Our app uses a lot of Ajax stuff, e. g. if a key is pressed in a text
field we're setting a changed flag in the bean.
If a user is typing something in the text field the CPU load is about
20-30%. This is definitely too high, so I set some parameters in domain.xml:
<http-listener acceptor-threads="2" address="0.0.0.0"
blocking-enabled="false" default-virtual-server="server" enabled="true"
family="inet" id="http-listener-2" port="443" security-enabled="true"
server-name="" xpowered-by="true">
As far as I know "acceptor-threads" should be set to the number of CPUs
[1]. The Glassfish doc recommends something with 50 threads or so [2]. I
think that's wrong, please correct the documentation.
<request-processing header-buffer-length-in-bytes="8192"
initial-thread-count="50" request-timeout-in-seconds="30"
thread-count="400" thread-increment="10"/>
<connection-pool max-pending-count="-1" queue-size-in-bytes="-1"
receive-buffer-size-in-bytes="4096" send-buffer-size-in-bytes="8192"/>
The CPU load is still about 20-30%. On Tomcat the load was < 5%.
What parameters can I tune else? Or should I increase the thread-count?
Thanks,
Gerald
[1]
http://weblogs.java.net/blog/jfarcand/archive/2007/03/configuring_gri_2.html
[2]
https://glassfish.dev.java.net/javaee5/docs/AG/ablsw.html