Does a war file size affect in some way the application and/or application server performance?

纵饮孤独 提交于 2019-12-22 05:07:32

问题


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.


回答1:


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.



回答2:


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.



来源:https://stackoverflow.com/questions/3314815/does-a-war-file-size-affect-in-some-way-the-application-and-or-application-serve

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!