Hello,
I am trying to get to the bottom of some performance problems I am having with my
Java application.
It is a Java war file running on a
Tomcat 6.0.16 application server, being hosted on a Solaris 5.10 Virtual server x86 architecture (we use VM boxes instead of physical boxes). JDK is 1.5.0_17-b04.
Every so often, whether viewing static pages (eg an FAQ page) or whether running searches on a database (which connects to another server which does the actual search and passes the results back), the application seems to 'hang' for about 10 seconds, then return the page requested. There is no consistency in the intervals at which this happens and we have only got our web application running (and the Tomcat manager), there are no other applications hogging memory.
I can see the garbage collector running (little and often, usually about 0.01secs to run) so I don't think that is the problem. There is also plenty of JVM heap size (we have a 1GB heap allocated), usage rarely tips over 100MB.
However, the application runs absolutely fine on our Windows XP boxes where we do our development, no pauses, instant responses.
I have seen this behaviour before when running an application on a Windows box (no problem), then switching to UNIX (problems). I know Windows is more forgiving than Unix and tends to handle memory usage better (I speak from experience, not authority!).
So my questions are:
1) Does a Windows box tend to run Java applications better than UNIX or at least handle things like memory and general performance better?
2) Any ideas why I might be getting this intermittent slowdown? Could it be hardware rather than software?
Thanks all for suggestions in advance!