[jboss-user] [JBoss Portal] - Re: Performance Issue with JBP2.7.1; Any workaround??

Vineet_Tripathi do-not-reply at jboss.com
Thu May 7 18:51:35 EDT 2009


Downloaded 2.7.2-GA released code, build and deploy
(with hypersonic database, show sql set to true, log statements as specified by vivek)
created 5 users, went to there dashboard, verified in db the no of dashboards created:

  | select count(1) from JBP_OBJECT_NODE where PARENT_KEY = 8
  |  COUNT(1)    
  |  ----------- 
  |  	5   
  | 
Restarted the server:

login as First user, first access to dashboard, url requested (portal/auth/dashboard)


  | 15:01:42,269 INFO  [STDOUT] session created
  | 15:01:49,328 INFO  [STDOUT] user login
  | 15:01:49,338 INFO  [PortalObjectImpl] before getChild(name);===>
  | 15:01:49,339 INFO  [STDOUT] Hibernate: select children0_.PARENT_KEY as PARENT4_1_, children0_.PK as PK1_, children0_.NAME as NAME1_, children0_.PK as PK9_0_, children0_."PATH" as PATH2_9_0_, children0_.NAME as NAME9_0_, children0_.PARENT_KEY as PARENT4_9_0_ from JBP_OBJECT_NODE children0_ where children0_.PARENT_KEY=?
  | 15:01:49,342 INFO  [STDOUT] Hibernate: select portalobje0_.PK as PK10_0_, portalobje0_.LISTENER as LISTENER10_0_, portalobje0_4_.INSTANCE_REF as INSTANCE2_18_0_, case when portalobje0_1_.PK is not null then 1 when portalobje0_2_.PK is not null then 2 when portalobje0_3_.PK is not null then 3 when portalobje0_4_.PK is not null then 4 when portalobje0_.PK is not null then 0 end as clazz_0_, declaredpr1_.OBJECT_KEY as OBJECT1_2_, declaredpr1_.jbp_VALUE as jbp2_2_, declaredpr1_.NAME as NAME2_, modes2_.PK as PK3_, modes2_.name as name3_, windowstat3_.PK as PK4_, windowstat3_.name as name4_ from JBP_PORTAL_OBJECT portalobje0_ left outer join JBP_CONTEXT portalobje0_1_ on portalobje0_.PK=portalobje0_1_.PK left outer join JBP_PORTAL portalobje0_2_ on portalobje0_.PK=portalobje0_2_.PK left outer join JBP_PAGE portalobje0_3_ on portalobje0_.PK=portalobje0_3_.PK left outer join JBP_WINDOW portalobje0_4_ on portalobje0_.PK=portalobje0_4_.PK left outer join JBP_PORTAL_OBJECT_PROPS declaredpr1_ on portalobje0_.PK=declaredpr1_.OBJECT_KEY left outer join JBP_PORTAL_MODE modes2_ on portalobje0_.PK=modes2_.PK left outer join JBP_PORTAL_WINDOW_STATE windowstat3_ on portalobje0_.PK=windowstat3_.PK where portalobje0_.PK=?
  | 15:01:49,353 INFO  [STDOUT] Hibernate: select portalobje0_.PK as PK10_0_, portalobje0_.LISTENER as LISTENER10_0_, portalobje0_4_.INSTANCE_REF as INSTANCE2_18_0_, case when portalobje0_1_.PK is not null then 1 when portalobje0_2_.PK is not null then 2 when portalobje0_3_.PK is not null then 3 when portalobje0_4_.PK is not null then 4 when portalobje0_.PK is not null then 0 end as clazz_0_, declaredpr1_.OBJECT_KEY as OBJECT1_2_, declaredpr1_.jbp_VALUE as jbp2_2_, declaredpr1_.NAME as NAME2_, modes2_.PK as PK3_, modes2_.name as name3_, windowstat3_.PK as PK4_, windowstat3_.name as name4_ from JBP_PORTAL_OBJECT portalobje0_ left outer join JBP_CONTEXT portalobje0_1_ on portalobje0_.PK=portalobje0_1_.PK left outer join JBP_PORTAL portalobje0_2_ on portalobje0_.PK=portalobje0_2_.PK left outer join JBP_PAGE portalobje0_3_ on portalobje0_.PK=portalobje0_3_.PK left outer join JBP_WINDOW portalobje0_4_ on portalobje0_.PK=portalobje0_4_.PK left outer join JBP_PORTAL_OBJECT_PROPS declaredpr1_ on portalobje0_.PK=declaredpr1_.OBJECT_KEY left outer join JBP_PORTAL_MODE modes2_ on portalobje0_.PK=modes2_.PK left outer join JBP_PORTAL_WINDOW_STATE windowstat3_ on portalobje0_.PK=windowstat3_.PK where portalobje0_.PK=?
  | 15:01:49,366 INFO  [STDOUT] Hibernate: select portalobje0_.PK as PK10_0_, portalobje0_.LISTENER as LISTENER10_0_, portalobje0_4_.INSTANCE_REF as INSTANCE2_18_0_, case when portalobje0_1_.PK is not null then 1 when portalobje0_2_.PK is not null then 2 when portalobje0_3_.PK is not null then 3 when portalobje0_4_.PK is not null then 4 when portalobje0_.PK is not null then 0 end as clazz_0_, declaredpr1_.OBJECT_KEY as OBJECT1_2_, declaredpr1_.jbp_VALUE as jbp2_2_, declaredpr1_.NAME as NAME2_, modes2_.PK as PK3_, modes2_.name as name3_, windowstat3_.PK as PK4_, windowstat3_.name as name4_ from JBP_PORTAL_OBJECT portalobje0_ left outer join JBP_CONTEXT portalobje0_1_ on portalobje0_.PK=portalobje0_1_.PK left outer join JBP_PORTAL portalobje0_2_ on portalobje0_.PK=portalobje0_2_.PK left outer join JBP_PAGE portalobje0_3_ on portalobje0_.PK=portalobje0_3_.PK left outer join JBP_WINDOW portalobje0_4_ on portalobje0_.PK=portalobje0_4_.PK left outer join JBP_PORTAL_OBJECT_PROPS declaredpr1_ on portalobje0_.PK=declaredpr1_.OBJECT_KEY left outer join JBP_PORTAL_MODE modes2_ on portalobje0_.PK=modes2_.PK left outer join JBP_PORTAL_WINDOW_STATE windowstat3_ on portalobje0_.PK=windowstat3_.PK where portalobje0_.PK=?
  | 15:01:49,382 INFO  [STDOUT] Hibernate: select portalobje0_.PK as PK10_0_, portalobje0_.LISTENER as LISTENER10_0_, portalobje0_4_.INSTANCE_REF as INSTANCE2_18_0_, case when portalobje0_1_.PK is not null then 1 when portalobje0_2_.PK is not null then 2 when portalobje0_3_.PK is not null then 3 when portalobje0_4_.PK is not null then 4 when portalobje0_.PK is not null then 0 end as clazz_0_, declaredpr1_.OBJECT_KEY as OBJECT1_2_, declaredpr1_.jbp_VALUE as jbp2_2_, declaredpr1_.NAME as NAME2_, modes2_.PK as PK3_, modes2_.name as name3_, windowstat3_.PK as PK4_, windowstat3_.name as name4_ from JBP_PORTAL_OBJECT portalobje0_ left outer join JBP_CONTEXT portalobje0_1_ on portalobje0_.PK=portalobje0_1_.PK left outer join JBP_PORTAL portalobje0_2_ on portalobje0_.PK=portalobje0_2_.PK left outer join JBP_PAGE portalobje0_3_ on portalobje0_.PK=portalobje0_3_.PK left outer join JBP_WINDOW portalobje0_4_ on portalobje0_.PK=portalobje0_4_.PK left outer join JBP_PORTAL_OBJECT_PROPS declaredpr1_ on portalobje0_.PK=declaredpr1_.OBJECT_KEY left outer join JBP_PORTAL_MODE modes2_ on portalobje0_.PK=modes2_.PK left outer join JBP_PORTAL_WINDOW_STATE windowstat3_ on portalobje0_.PK=windowstat3_.PK where portalobje0_.PK=?
  | 15:01:49,417 INFO  [STDOUT] Hibernate: select portalobje0_.PK as PK10_0_, portalobje0_.LISTENER as LISTENER10_0_, portalobje0_4_.INSTANCE_REF as INSTANCE2_18_0_, case when portalobje0_1_.PK is not null then 1 when portalobje0_2_.PK is not null then 2 when portalobje0_3_.PK is not null then 3 when portalobje0_4_.PK is not null then 4 when portalobje0_.PK is not null then 0 end as clazz_0_, declaredpr1_.OBJECT_KEY as OBJECT1_2_, declaredpr1_.jbp_VALUE as jbp2_2_, declaredpr1_.NAME as NAME2_, modes2_.PK as PK3_, modes2_.name as name3_, windowstat3_.PK as PK4_, windowstat3_.name as name4_ from JBP_PORTAL_OBJECT portalobje0_ left outer join JBP_CONTEXT portalobje0_1_ on portalobje0_.PK=portalobje0_1_.PK left outer join JBP_PORTAL portalobje0_2_ on portalobje0_.PK=portalobje0_2_.PK left outer join JBP_PAGE portalobje0_3_ on portalobje0_.PK=portalobje0_3_.PK left outer join JBP_WINDOW portalobje0_4_ on portalobje0_.PK=portalobje0_4_.PK left outer join JBP_PORTAL_OBJECT_PROPS declaredpr1_ on portalobje0_.PK=declaredpr1_.OBJECT_KEY left outer join JBP_PORTAL_MODE modes2_ on portalobje0_.PK=modes2_.PK left outer join JBP_PORTAL_WINDOW_STATE windowstat3_ on portalobje0_.PK=windowstat3_.PK where portalobje0_.PK=?
  | 15:01:49,430 INFO  [PortalObjectImpl] After getChild(name);===>
  | 
  | 
Five queries fired, corresponding to each dashboard of dashboard context!!!! (What if we have 10000 users, each with a dashboard !!!!, 10000 selects..)
The situation will be pretty bad if the no of users with dashboard are so high that every corresponding node could not be cached.
First user, second access:


  | 15:09:33,662 INFO  [PortalObjectImpl] before getChild(name);===>
  | 15:09:33,667 INFO  [PortalObjectImpl] After getChild(name);===>
  | 
  | 
Time taken 5 milliseconds.
I create another user, total no of users now (6, but dashboard has not been created yet for new user), logout and login as new user(go to dashboard):

New user, First access (dashboard does not exists yet)


  | 15:15:44,260 INFO  [PortalObjectImpl] before getChild(name);===>
  | 15:15:44,266 INFO  [STDOUT] Hibernate: select children0_.PARENT_KEY as PARENT4_1_, children0_.PK as PK1_, children0_.NAME as NAME1_, children0_.PK as PK9_0_, children0_."PATH" as PATH2_9_0_, children0_.NAME as NAME9_0_, children0_.PARENT_KEY as PARENT4_9_0_ from JBP_OBJECT_NODE children0_ where children0_.PARENT_KEY=?
  | 15:15:44,290 INFO  [STDOUT] Hibernate: select portalobje0_.PK as PK10_0_, portalobje0_.LISTENER as LISTENER10_0_, portalobje0_4_.INSTANCE_REF as INSTANCE2_18_0_, case when portalobje0_1_.PK is not null then 1 when portalobje0_2_.PK is not null then 2 when portalobje0_3_.PK is not null then 3 when portalobje0_4_.PK is not null then 4 when portalobje0_.PK is not null then 0 end as clazz_0_, declaredpr1_.OBJECT_KEY as OBJECT1_2_, declaredpr1_.jbp_VALUE as jbp2_2_, declaredpr1_.NAME as NAME2_, modes2_.PK as PK3_, modes2_.name as name3_, windowstat3_.PK as PK4_, windowstat3_.name as name4_ from JBP_PORTAL_OBJECT portalobje0_ left outer join JBP_CONTEXT portalobje0_1_ on portalobje0_.PK=portalobje0_1_.PK left outer join JBP_PORTAL portalobje0_2_ on portalobje0_.PK=portalobje0_2_.PK left outer join JBP_PAGE portalobje0_3_ on portalobje0_.PK=portalobje0_3_.PK left outer join JBP_WINDOW portalobje0_4_ on portalobje0_.PK=portalobje0_4_.PK left outer join JBP_PORTAL_OBJECT_PROPS declaredpr1_ on portalobje0_.PK=declaredpr1_.OBJECT_KEY left outer join JBP_PORTAL_MODE modes2_ on portalobje0_.PK=modes2_.PK left outer join JBP_PORTAL_WINDOW_STATE windowstat3_ on portalobje0_.PK=windowstat3_.PK where portalobje0_.PK=?
  | 15:15:44,317 INFO  [PortalObjectImpl] After getChild(name);===>
  | 
  | 
only one select query fired for the new dashboard.
Second access:


  | 15:17:43,575 INFO  [PortalObjectImpl] before getChild(name);===>
  | 15:17:43,579 INFO  [PortalObjectImpl] After getChild(name);===>
  | 
  | 
logout this new user and login again as different user .
Second user, First access

  | 15:26:54,806 INFO  [PortalObjectImpl] before getChild(name);===>
  | 15:26:54,810 INFO  [PortalObjectImpl] After getChild(name);===>
  | 
Second user, Second access:

  | 15:29:25,624 INFO  [PortalObjectImpl] before getChild(name);===>
  | 15:29:25,628 INFO  [PortalObjectImpl] After getChild(name);===>
  | 

Logout second user, Again login as First user :

First access to dashboard:


  | 15:32:49,372 INFO  [STDOUT] session destroyed
  | 15:32:49,373 INFO  [STDOUT] user logout
  | 15:32:49,382 INFO  [STDOUT] session created
  | 15:33:07,851 INFO  [STDOUT] user login
  | 15:33:07,854 INFO  [PortalObjectImpl] before getChild(name);===>
  | 15:33:07,858 INFO  [PortalObjectImpl] After getChild(name);===>
  | 

So no call to db, picking nodes from cache. Now compare the results with my previous tests (posted before this with SVN code), 
If we were getting nodes from cache, the time taken was always 0 to 1 milli seconds, its now consistently
4-5 milliseconds(If there will be 10000 dashboards, perfromance will be pretty poor even if we get from cache)


Any thoughts to avoid this, or should go with SVN code..

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

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




More information about the jboss-user mailing list