On Fri, Jul 20, 2012 at 6:31 PM, Tony Anecito <adanec...@yahoo.com> wrote:

> Thanks for the quick reply Mark.
> Yes I saw your comments in one of your presentations about profilier and I
> am a fan of visualvm and have profiled Tomcat in the past but when down to
> 1-2msec not sure how much the profilier can pick up. I did notice that as
> the hotspot engine "warms up" the response times start to see improvement.
> I did adjust the -Xss256k from the default of 1M and I am looking forward
> to when I get home to see the results since the response times quickly went
> to 3msec after that was set and hope to see 1msec or below after running
> for 1 day if that change really helps. I did start out profiling the SQL
> and that helped and switching to the jtds jdbc driver which seem to help
> even more and of course eliminating the interprocess communication (Tomcat
> - JBoss). I made sure my data types in SQL server were unicode so the jdbc
> drive did not do extra conversion work to unicode. I am slowly moving to
> the front (JAX-WS to JAX-RS) and then a deep dive into OS tuning. After that
>  I will stop tuning for another 6 months I guess.
>

Tony,

With all due respect, you sound like you are fiddling with settings to
learn rather than tuning. What I understand by tuning a webapp is that you

   1. Create a automated test script to simulate some load
   2. You increase the load until the bring the webapp to its knees -
   either >80% CPU or responses taking >1/2 sec to return
   3. Critical step - you tell your bosses the maximum level that the app
   can currently support, e.g. X concurrent users performing A and B and C
   routes through the app.
   4. If they say that's all they need, then stop
   5. Otherwise use a profiler to establish where the bottle neck is
   6. Fix it
   7. Repeat from step 2

Using this technique you make sure that you don't waste time fixing issues
that aren't really issues. As a programmer, its kind of hurts to admit it,
but programmers are wrong when thy guess where the performance issues are.
Always. This isn't my idea - read the performance tuning books. You'll just
make code more complicated, and less maintainable.

IMO there is nothing wrong with fiddling with settings to see what they do.
However unless you have a repeatable (read automated) test script that
allows you to test after each individual change, you're just whistling in
the wind.

Now it is possible that I have all this wrong. Perhaps you have an
automated script, and you are doing all the above. It doesn't sound from
your description that this is the case, but if it is then I apologise

HTH

Chris

Reply via email to