Java Servlet container performance?

你说的曾经没有我的故事 提交于 2019-12-07 04:17:57

问题


I'd like to ask the Java pros here a question about my current study that I am about to do - what are the key contributors to the differences in efficiency of various servlet containers? I need to compare Tomcat/JBoss/Glassfish/Jetty etc. and I need to know what "factors" may affect the results in the most significant way? I am going to write mock applications for that purpose, so any recommendation for a Java feature/framework/library etc. that I might implement there so that I can greatly increase the load of the containers (actually the containers, I do not care about the load of the machine since I am going to run all the tests on the same machine of course), would be appreciated! I need the study to be as objective as possible. Thanks for any help guys!


回答1:


Some things that could tax a web container (apart from lots of requests, of course):

  • Working with a small heap (e.g. only 128 or 256 MB)
  • Passivating sessions (have large serializable objects in every session, too large to keep all in memory)
  • Serve static resources (lots of small ones, or some big ones)
  • Requests that fail (404 or server error)
  • JSPs that include a lot of other JSPs
  • Large number of different JSPs
  • Large number different servlet mappings
  • Large number of chained servlet filters
  • Large number of separate applications
  • Redeploying applications (make sure the apps themseves have no classloader leak)



回答2:


Some more parameters:

  1. Compression enabled
  2. Caching enabled
  3. Turing the buffer sizes


来源:https://stackoverflow.com/questions/6148663/java-servlet-container-performance

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