• 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

JBoss performance Tuning in Linux

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
These 6000 requests are made sequentially; one after the other.
 
author
Posts: 194
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
JavaMonitor Support
Posts: 251
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 251
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic