This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Performance and the fly likes Java performance on Windows versus UNIX (Solaris) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "Java performance on Windows versus UNIX (Solaris)" Watch "Java performance on Windows versus UNIX (Solaris)" New topic
Author

Java performance on Windows versus UNIX (Solaris)

Northern Andrew
Greenhorn

Joined: Mar 18, 2009
Posts: 2
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!
Anurag Blore
Ranch Hand

Joined: Jan 15, 2003
Posts: 74
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.



Thanks,
Anurag
SCJP 1.2 & 1.5, PMP
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15962
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Northern Andrew
Greenhorn

Joined: Mar 18, 2009
Posts: 2
Thanks guys, I will ask our server team to investigate the VM usage.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java performance on Windows versus UNIX (Solaris)
 
Similar Threads
Out of memory
Websphere Performance tuning
Out Of Memory Error?
Measuring performance of a Application
Keystore Generation in Java Code