[jboss-user] [JBoss Seam] - Re: Seam performance vs plain JSF

gonzalad do-not-reply at jboss.com
Mon Dec 10 14:03:55 EST 2007


So Monday....

Hello !

Here is some more information about the load tests we executed.

If you want more information please tell me. Also, if you have an idea on how we can achieve betters results, I'm interested (of course !).
Otherwise I think you can find some interesting comparative and instructive (ar least for me !) performance results.
Please note, I'm really far from being a bench expert or a system expert - I'm only a humble little developper so once more please - if anyone sees some
interesting optimization to apply just tell me !

Also, those tests were made on a simple application and are not representative for application in production environment
(we didnt' have time to code one for each framework :)).

Extract
>From our test: 
. Seam consumes 3 times (really average) more cpu than the same app with plain jsf.
. JSF consumes 3 times (really average) more than plain old Struts like app.

I would have really expected at the beginning a performance ratio of 2 times more for Seam app that Struts like but it's like 10 !
arrrgghhhhh !
 
I - Test Environment

1. Injector platform used :
Pentium IV 3 GHz, 2 Go RAM.
Windows XP Professional SP1 with JMeter 2.3.

2. App Server
Websphere 6.1.0.13
IBM JRE 5.0 SR6 64bits 
	(Java(TM) 2 Runtime Environment, Standard Edition (build pap64devifx-20071025 (SR6b)).
sxqwas02 : 6 Processors 2.1 GHz Power PC5
40894464 Ko
One JVM
No clustering and no session replication.
JVM Parameters
Initial Heap Size = 256 Mo
Max Heap Size = 512 Mo
Web Container Threads = 
Session Timeout = 4 minutes
JDBC Pool = {connectionTimeout=60s, maxConnections=10, minConnections=5, reapTime=60, unusedTimeout=120, aged=0}
Threadpool : minSize = 5,maxSize = 20

3. Web Server
IBM HTTP Server 6.1.0.5
CPU : 1 proc 2812.972 MHz 
Dual-Core AMD Opteron(tm) Processor 8220 SE
RAM : 1025372 Ko
IHS Parameters
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
StartServers         5
MaxClients         150
MinSpareThreads     5
MaxSpareThreads     10
ThreadsPerChild     25
MaxRequestsPerChild 10000


II - Test scenario

1. Scenario
User uses jpa sample application bundled with Seam.
All vusers execute the following scenario in loop :
1. go to page /jpa/home.seam
2. loggin
	user=demo
	pass=demo
3. user press the 'Find Hotel' button 
	(no search criteria and max results=10).
4. user selects first record in the list
5. user books this hotel
6. user enters booking information
7. user confirms his reservation
8. user cancels his reservation.

2. mesurement points
All version of the application were tested with 15tx/s, 30tx/s, 60tx/s, 120tx/s, 240tx/s.

3. Ramp up period/think time, vuser count, etc...
No think time.
No Ramp up period (we used a constant throughput timer in JMeter to limit the number of request to 15, 30, ...tx/s) depending on the scenario.

4. Applications tested
a. jpa sample modified to remove a4j and RichFaces components & libraries.
	uses SUN RI 1.2 (bundled with Seam), facelets, Seam 2.0.0.GA
	name:jpa-no-a4j.ear
	same as jpa from Seam except rich*.jar removed, el-impl.jar added (if it wasn't already there).
b. jpa sample modified to remove Seam, include Spring for business Layer.
	uses SUN RI 1.2, facelets, Spring (bundled with Seam 2.0.0.GA)
	name:jpa-standard-jsf-facelets.ear
c. jpa sample modified to remove Seam and facelets, include Spring for business Layer.
	uses SUN RI 1.2, JSP, Spring (bundled with Seam 2.0.0.GA)
	name:jpa-standard-jsf-sun-1.2.ear
d. jpa sample modified to remove Seam and facelets, include Spring for business Layer.
	uses IBM JSF (1.1), JSP, Spring (bundled with Seam 2.0.0.GA)
	name:jpa-standard-jsf.ear
e. another demo application which runs with a Struts like framework.
	name:demo.ear

5. Notes
Please, note that when we removed Seam, we put hotel list in request scope, not in session scope.
Note also log level was at WARN (so no logs after startup during test execution).


III Results

Result data was retrieved from :
a. JMeter Summary Report (tx/s, page size).
b. topas (cpu usage).
c. Wily Introscope (hea size, session size)

1. Test with 15tx/s
Scenario	     tx/s	CPU used(%)	el time moy (ms)	page size (ko)	session size (ko)	bytes used in heap (Mo)
  | jpa-no-a4j.ear	   15	           10	                    87	                     5,8	                          181,4	                         244,3
  | jpa-standard-jsf-facelets.ear	
  |                           15	           4	                    49	                     6,2	                          81,1	         NA
  | jpa-standard-jsf.ear	
  |                           15	           4	                     47	                     6,2	                          2,0	         220
  | jpa-standard-jsf-sun-1.2.ear	
  |                           15	          4,5	                    42	                    5,8	                              
  |                           198,2	       232,8
  | demo.ear	     15	             1,1	               13	               17	
  |                           1,9	         250
  | 

2. Test with 30tx/s
Scenario	tx/s	CPU used(%)	el time moy (ms)	page size (ko)	session size (ko)	bytes used in heap (Mo)
jpa-no-a4j.ear	29	20	79	6,2	184	249,6
jpa-standard-jsf-facelets.ear	30	7	43	6,0	NA	NA
jpa-standard-jsf.ear	30	7	52	6,2	2,4	245
jpa-standard-jsf-sun-1.2.ear	NA	NA	NA	NA	NA	NA
demo.ear	30	2	13	17	1,9	253

3. Test with 60tx/s
Scenario	tx/s	CPU used(%)	el time moy (ms)	page size (ko)	session size (ko)	bytes used in heap (Mo)
jpa-no-a4j.ear	51,8	41	77	6,5	182,1	248,8
jpa-standard-jsf-facelets.ear	60	11	45	6,2	2,3	255
jpa-standard-jsf.ear	60	16	43	6,2	2,5	251
jpa-standard-jsf-sun-1.2.ear	NA	NA	NA	NA	NA	NA
demo.ear	62	3,8	13	17	1,9	255

4. Test with 120tx/s
Scenario	tx/s	CPU used(%)	el time moy (ms)	page size (ko)	session size (ko)	bytes used in heap (Mo)
jpa-no-a4j.ear	86	65	102	8,6	182	304
jpa-standard-jsf-facelets.ear	113	22	41	6,8	2,8	262
jpa-standard-jsf.ear	115	30	41	6,2	2,1	248
jpa-standard-jsf-sun-1.2.ear	112	20	50	6,1	201	261
demo.ear	123	7,2	15	17	1,9	246

5. Test with 240tx/s
Scenario	tx/s	CPU used(%)	el time moy (ms)	page size (ko)	session size (ko)	bytes used in heap (Mo)
jpa-no-a4j.ear	Saturation	Saturation	Saturation	Saturation	Saturation	Saturation
jpa-standard-jsf-facelets.ear	205	50	53	6,2	3,3 ko	237
jpa-standard-jsf.ear	206	55	53	6,2	3,1	252
jpa-standard-jsf-sun-1.2.ear	NA	NA	NA	NA	NA	NA
demo.ear	240	14,2	14	17	1,9	251

6. Test with 480tx/s
Scenario	tx/s	CPU used(%)	el time moy (ms)	page size (ko)	session size (ko)	bytes used in heap (Mo)
all jpa samples saturated
demo.ear	440	25	17	17	1,9	255


IV - Configuration files for jpa-no-a4j.ear

components.xml
<?xml version="1.0" encoding="UTF-8"?>
  | <components xmlns="http://jboss.com/products/seam/components"
  |             xmlns:core="http://jboss.com/products/seam/core"
  |             xmlns:persistence="http://jboss.com/products/seam/persistence"
  |             xmlns:transaction="http://jboss.com/products/seam/transaction"
  |             xmlns:security="http://jboss.com/products/seam/security"
  |             xmlns:web="http://jboss.com/products/seam/web"
  |             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |             xsi:schemaLocation=
  |                 "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd 
  |                  http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd 
  |                  http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
  |                  http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.0.xsd
  |                  http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
  | 
  |     <core:manager conversation-timeout="120000" 
  |                   concurrent-request-timeout="500"
  |                   conversation-id-parameter="cid"/>
  |                   
  |                   
  |     <persistence:entity-manager-factory name="bookingDatabase"/>
  |     
  |     <persistence:managed-persistence-context name="em"
  |                                auto-create="true" 
  |                     entity-manager-factory="#{bookingDatabase}"/>
  |                     
  |     <security:identity authenticate-method="#{authenticator.authenticate}"/>  
  |     
  |     <!-- WAS requires the filter to be mapped to a suffix, so can't use built in Seam filter --> 
  |     <web:ajax4jsf-filter disabled="true" />
  |     
  | </components>

web.xml
<?xml version="1.0" encoding="UTF-8"?>
  | <web-app id="WebApp_ID" version="2.4"
  | xmlns="http://java.sun.com/xml/ns/j2ee"
  | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  | xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
  | http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  |     
  |     
  |     <!-- Seam -->
  |     
  |     <listener>              
  |       <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>        
  |     </listener>
  |     
  | 
  |     <filter>
  |       <filter-name>Seam Filter</filter-name>
  |       <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
  |     </filter>
  | 
  |     <filter-mapping>
  |       <filter-name>Seam Filter</filter-name>
  |       <url-pattern>/*</url-pattern>
  |     </filter-mapping>
  |     
  |     <servlet>
  |       <servlet-name>Seam Resource Servlet</servlet-name>
  |       <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
  |     </servlet>
  |     
  |     <servlet-mapping>
  |       <servlet-name>Seam Resource Servlet</servlet-name>
  |       <url-pattern>/seam/resource/*</url-pattern>
  |     </servlet-mapping>     
  | 
  |     
  |     <servlet>              
  |       <servlet-name>Faces Servlet</servlet-name>              
  |       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>              
  |       <load-on-startup>1</load-on-startup>        
  |     </servlet>
  |     
  |     <!-- Faces Servlet Mapping -->
  |     
  |     <servlet-mapping>              
  |       <servlet-name>Faces Servlet</servlet-name>              
  |       <url-pattern>*.seam</url-pattern>        
  |     </servlet-mapping>
  |     
  | 	<context-param>
  | 		<param-name>facelets.REFRESH_PERIOD</param-name>
  | 		<param-value>-1</param-value>
  | 	</context-param>
  | 
  | 	<context-param>
  |                <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
  | 		<param-value>server</param-value>
  | 	</context-param>
  | 
  | 	<context-param>
  |  	       <param-name>com.sun.faces.preferXHTML</param-name>
  | 		<param-value>true</param-value>
  | 	</context-param>
  | 
  | 	<context-param>
  |            <param-name>com.sun.faces.responseBufferSize</param-name>
  | 	<param-value>70000</param-value>
  | 	</context-param>
  | 
  | 	<context-param>
  | 		<param-name>facelets.BUFFER_SIZE</param-name>
  | 		<param-value>70000</param-value>
  | 	</context-param>
  | 
  |     
  |     <context-param>        
  |       <param-name>javax.faces.DEFAULT_SUFFIX</param-name>        
  |       <param-value>.xhtml</param-value>    
  |     </context-param>
  |     
  |     <context-param>        
  |       <param-name>facelets.DEVELOPMENT</param-name>        
  |       <param-value>false</param-value>    
  |     </context-param>  
  |     
  |     <listener>
  |         <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
  |     </listener> 
  |         
  |     <session-config>
  |         <session-timeout>10</session-timeout> 
  |     </session-config>     
  |     
  | </web-app>
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111737#4111737

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111737



More information about the jboss-user mailing list