views:

244

answers:

3

Hi there,

I have a quick question that someone might be able to answer. We have recently built a java library that is referenced within a web service that runs on a JBoss application server. The performance of the web service on a standard Windows XP machine is satisfactory and takes about 1.5 seconds for the whole process. However when we deploy the web service on a Solaris JBoss machine we notice a significant decrease in performance although the virtual server where Solaris is hosted is much more powerful. The overall processing time increases to 3.6 seconds when one would expect a much better overall speed from the windows machine. The windows machine is a simple Pentium desktop where Solaris runs in a virtual server hosted on a Sun Sparc. The first thing that came to mind is Garbage Collection as this library uses a lot of arrays, arraylists and frequently allocates new objects. Has anyone had a similar experience or ideas of what might be happening?

Regards Dimitris

+1  A: 

No, but I would suggest you attach with jvisualvm to see where the time is spent.

Also use standard Solaris tools like iostat and vmstat to identify if any hardware resource is exhausted.

Thorbjørn Ravn Andersen
jvisualvm is bundled with JDK 1.6.0_7 and later.
richj
+1  A: 

You will need to test your hypothesis using some form of profiling. It is usually much easier to profile code outside of the application server, unless you have suitable tools available to do this in place (e.g. something like OptimizeIt).

Can you test the performance of your library outside of the JBoss environment? If you can, then this is the way to start. Once you have your test harness you can start to profile the individual components and subcomponents to see where the time is spent.

In a test environment it is much easier to perform experiments such as turning off garbage collection, or increasing the start and maximum heap sizes.

The observations from your experiments will give you new ideas on where to look and further experiments to perform.

richj
Hi thanks for the reply. Actually we have profiled our library and experimented with it on the windows machine and there is nothing apart the obvious that stands out. However we havent done the same on the Solaris machine mainly because there are permission issues there. My question is mainly to do with people's past experience on this moving from windows to solaris jboss.
Dimitris
A: 

Hello, I too face the same issue. When I run my java server on windows, I get better performance as compared to when I run on Solaris. Can this be the diff in JVM versions? I have v6 on win & v5 on Solaris. Do you also differ in the JVM versions on the 2 boxes?

Mukta