I am working on a Java Web Application, using the following frameworks : Spring 3.1, JSF 2.1.26 and RichFaces 4.3.3. The whole app is running in the Amazon Cloud under medium.m1 instances (2 - 2.4 Ghz single core), with a Tomcat 7.
My customer asked questions about the performances of the web application, and about the number of concurrent users that can be handled on the same server. He gave me a report showing that a servlet with about the same hardware than the Amazon medium one is able to serve about 1000 requests per seconds (40KB page) : https://www.webperformance.com/library/reports/windows_vs_linux_part1/
I took a classic page with header/footer, data table, sort/search/filters/data scroller... (80KB). I removed the database, the filters (security, etc., except JSF one) and kept 20 visible rows. Without any load, that page takes about 300 ms to be loaded.
When I executed the load test for my application, I realize that it can only serve 20 requests per second before the request/response time exceeds the 1000 ms. Can you tell me if this is a normal behavior? I can understand a JSF page is longer to build than a simple servlet one, but not being able to serve more than 20 requests, while the servlet can serve 1 000 is puzzling.
Is there any standard benchmark for a typical JSF application? If you think I have optimization problem, can you tell me where I can search?
Thanks in advance for your answer!
In my personal opinion, you should take a look first at this article at JSF Central: Understanding JSF 2.0 Performance – Part 3 The code can be found On Github including the war files used in the comparison. There you can find a simple web application using JSF and the same application implemented in different web frameworks (Spring MVC with JSP or Thymeleaf, Tapestry, Wicket, Grails or plain Servlet with JSP).
The demo app has a simple stack using an in-memory database (HSQLDB) and JPA, so I think it should be pretty simple to deploy them on Amazon Cloud. That can give you a starting point about what can you expect from that environment and how you should set up your environment properly. Remember that in a complex system there are many elements that impacts performance, so you should evaluate later things like which params your persistence layer has and so on.
For JSF, it is known that Apache MyFaces will give you the best possible performance in all aspects, so if you can you should try with RichFaces + MyFaces combination.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With