views:

76

answers:

2

Hi, we've bean struggling here at work by somebody suggestion that we should decrease the size of our war file, specifically the WEB-INF/lib directory size, in order to improve our production JBoss instance performance. Something I'm still suspicious about.

We have around 15 web apps deploy in our application server, each about 15 to 20 MB in size.

I know there are a lot of variables involved on this, but has anyone of you actually deal with this situation? Does the .war files size actually has a significant impact on web containers in general?

What advice can you offer?

Thank U.

+3  A: 

There are many things to be suspicious of here:

  • What about the application is not performing to the level you would like?
  • Have you measured the application to find out which components are causing the lack of performance?
  • What are the bottlenecks in the application/system?

The size of the application alone has nothing to do with any sort of runtime performance. The number of classes loaded during the lifetime of the application has an impact on memory usage of the application, but an incredibly negligible one.

When dealing with "performance issues", the solution always follows the same general steps:

  • What does it mean when we say "bad performance"?
  • What specifically is not performing? Measure, measure, measure.
  • Can we improve the specific component not performing to the level we want?
  • If so, implement the ideas, measure again to find out if performance has truly improved.
matt b
That's the thing, there is no actual performance problem, only somebody suggestion about a possible degradation on performance due to .war files size.
StudiousJoseph
A possible degradation compared to what - compared to a smaller war? If so then this would be pretty simple to test - benchmark the original app vs a slimmer one. But are you including jars in WEB-INF/lib that you don't need? If not, then it is already as slim as it can be. This sounds like a suggestion with no facts to back it up.
matt b
A: 

Need you to tell us the operating system. Do you have antivirus live protection?

A war/jar file is actually a zip file - i.e., if you renamed a .war to a .zip, you can use a zip utility to view/unzip it.

During deployment, the war file is unzipped once into a designated folder. If you have live-protection, the antivirus utility might take some time to scan the new branch of directories created and slow down any access to them.

Many web app frameworks, like JSPs, create temporary files and your live-protection would get into action to scan them.

If this is your situation, you have to decide whether you wish to exclude your web-app from antivirus live-scanning.

Are you running Linux but your web directory is accessed using ntfs-3g? If so, check if the ntfs directory is compressed. ntfs-3g has problems accessing compressed ntfs files especially when multiple files are manipulated/created/uncompressed simultaneously. In the first place, unless there are some extremely valid reasons (which I can't see any), a web app directory should be a local partition in a format native to Linux.

Use wireshark to monitor the network activity. Find out if web apps are causing accesses to remote file systems. See if there are too many retransmits whenever the web apps are active. Excessive retransmits or requests for retransmits means the network pipeline has integrity problems. I am still trying to understand this issue myself - some network cards have buffering problems (as though buffer overflow) operating in Linux but not in Windows.

Wireshark is not difficult to use as long as you have an understanding of ip addresses, and you might wish to write awk, perl or python scripts to analyze the traffic. Personally, I would use SAS.

Blessed Geek
If you are running jboss on a windows server with virus scan, you have much worse problems than war file size...
bwawok