users@glassfish.java.net

Re: Performance issues with AJAX

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 13 Nov 2007 16:18:53 -0500

Hi,

Gerald Holl wrote:
> 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.

I would leave it to 1. Does it make a difference?

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

One thing (kind of unrelated) I would recommend you to look at to
improve performance is the following:

http://weblogs.java.net/blog/jfarcand/archive/2007/06/improving_ajax_1.html

As for the CPU, Can you reduce the thread-count to 100, set the
accpetor-thread to 1 and see if that help?

Thanks

-- Jeanfrancois

>
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>