File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes JBoss performance Tuning in Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss performance Tuning in Linux" Watch "JBoss performance Tuning in Linux" New topic
Author

JBoss performance Tuning in Linux

Prasan Jayaprakash Pai
Greenhorn

Joined: Dec 18, 2009
Posts: 1
Hello,

I have created an ear which takes around 5 minutes in JBoss installed Windows XP OS, while the same ear takes around 30 minutes when deployed in JBoss installed in Linux.

The version of the JBoss used in both the operating Systems is same. The ear deployed is same. It is really strange that there is so much difference when tested in 2 different OS.

I tried all the possible options mentioned in this link :- http://www.mastertheboss.com/en/jboss-application-server/113-jboss-performance-tuning-1.html

Though the performance improved by about 4-5 minutes.

Windows Version in which the application was deployed was Windows XP.
Linux OS is : Linux 2.6.18-128.1.14.el5 (i386)
JBoss version in both Windows and Linux is Version: 4.0.5GA.

Is there any other way which is missing in that page, which would improve the performance of Linux application comparitive to Windows.

Regards,
Prasan Pai

Prasan Pai
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10288
    
168

while the same ear takes around 30 minutes when deployed in JBoss installed in Linux.


Which exact version of JBoss AS and Java? Please post the console logs (the logs that you see on the console).

While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.


[My Blog] [JavaRanch Journal]
Prasan Pai
Greenhorn

Joined: Jun 20, 2008
Posts: 5
Jboss startup logs for Linux machine



Jboss startup logs for Windows XP machine




This is the initial server log displayed after starting JBoss. Since I have disabled log4j to improve performance, no more server logs can be found after this.
JBoss Version used is :- Jboss-4.0.5.GA
JDK used is :- 1.5.0_08

Same version of JBoss and JDK is used in both Linux and Windows.

Regards,
Prasan Pai
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10288
    
168

Prasan Pai wrote:
This is the initial server log displayed after starting JBoss. Since I have disabled log4j to improve performance, no more server logs can be found after this.
JBoss Version used is :- Jboss-4.0.5.GA
JDK used is :- 1.5.0_08



Without seeing the logs, it's difficult to say what's going on. In these logs i don't even see the 30 minute time taken for the bootup.
Prasan Pai
Greenhorn

Joined: Jun 20, 2008
Posts: 5
There is no problem with the Booting of JBoss.

I have created an application, which is a request / response Web Service.

Details about the service :- Whenever this service recieves an HTTP request in form of XML, the service will fetch the the data from database and send the response back in form of xml.

This service is called from a sequential job 6000 times.

For completion of these 6000 requests the application takes 30 mintues from the JBoss in Linus and 5 minutes from Windows.

Please tell me if you need anymore information about the service.

Thanks,
Prasan Pai
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10288
    
168

In that case, you will have to use a profiler to profile your application and see where that time is being spent. Are those 6000 request sequential or parallel?
Prasan Pai
Greenhorn

Joined: Jun 20, 2008
Posts: 5
These 6000 requests are made sequentially; one after the other.
Francesco Marchioni
author
Ranch Hand

Joined: Sep 22, 2003
Posts: 191
The two operating systems have different io stacks so you have to verify with a sysadmin where's your bottleneck, it can be located in the io stack ( you can try iostat or sar if you have them installed).

Anyway the two OS have different JVM heap settings from what I can see in the logs - for a reliable test you have to use the same -Xms and Xmx for both machines.
Hope it helps,
regards,
Francesco
MyJBossSite


WildFly 8 Administration Book - JBoss Tutorials
Kees Jan Koster
JavaMonitor Support
Rancher

Joined: Mar 31, 2009
Posts: 251
    
    5
If the linux I/O stack were 6 times slower than the one in Windows, I am sure people would have started to search for the problem by now. Would you not think so? I don't believe that the I/O handling implementation from the OS has anything to do with the problem of the original poster.

Instead I think there is a configuration difference between these two machines that causes this. Perhaps they use a different database to process the requests from? Perhaps the data set in the Linux machine's database is a lot bigger than the one that the Windows machine uses? Perhaps the Linux machine has a badly configured DNS setup so that it experiences frequent TCP timeouts? (such a time-out is usually 1 minute) Perhaps the Linux machine is heavily loaded or doing lots of I/O for another app? Perhaps the Linux machine has less RAM than that Windows machine? Perhaps the Linux machine has much less processing power?

Kees Jan


Java-monitor, JVM monitoring made easy <- right here on Java Ranch
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

My experience has been that JBoss AS takes about 1.5 times as long to start up on Windows XP as on Linux. This is on the same hardware (dual boot) using the same version of JBoss AS and the same JDK version. I attribute the different timings to differences in how each OS handles application loading and virtual memory - Linux tends to fill RAM to a certain level before using the swap file, while Windows tends to load only a small portion of the app and place the rest in swap and has the app page fault to grab more RAM.

I have also noticed that Linux takes longer to start JBoss AS when JBoss AS resides on an NTFS volume than on an ext3 volume.

However, once started and warmed up, my load and performance testing (which has been very extensive on a variety of hardware and OS/AS/JDK levels) has shown no significant differences between Windows or Linux.


JBoss In Action
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10288
    
168

Peter Johnson wrote:My experience has been that JBoss AS takes about 1.5 times as long to start up on Windows XP as on Linux.


I have seen similar results with JBoss AS5 (haven't tried with AS4). I always thought that it might be a case of OS level file system caching (which AFAIK is disabled in Windows) which speeds up things on *nix, although i haven't looked into it in detail.
Kees Jan Koster
JavaMonitor Support
Rancher

Joined: Mar 31, 2009
Posts: 251
    
    5
Both of you may be right, but that goes against what the OP is observing. His observations are precisely reverse: slow on Linux, saft on (local, I presume) Windows. So even with 1.5 times startup speed boost he sees a 6 times slowdown.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

slow on Linux, saft on (local, I presume) Windows.

You are right - I misread it as 5 minutes on Windows and 30 seconds on Linux. Guess my preconceptions clouded my vision!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JBoss performance Tuning in Linux