开发者

Java Performance Issue from Windows to Solaris JBoss

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 D开发者_开发技巧imitris


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜