• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java performance on Windows versus UNIX (Solaris)

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You mentioned

However, the application runs absolutely fine on our Windows XP boxes where we do our development, no pauses, instant responses.




If application is running well there could be chance the system from where you are getting your search response may be slow. You can check this by putting the simple time calculate method.

Now you said you are using a linux box on VM, I assume its shared . If its shared and lot of process is going on in this box then your application may be slow. You should check if the VM itself is slow before checking your application.


 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My first impulse would be to check the VM environment. 1GB of virtual machine memory is meaningless unless there's enough physical memory to back it up. Otherwise you're going to see serious paging activity, and a stall is about the best thing that can happen in that case. Also, if there a number of VMs guests in the host, it's possible that the overhead of switching machine contexts is catching up with you.
 
Northern Andrew
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks guys, I will ask our server team to investigate the VM usage.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic