-
Type:
Suggestion
-
Resolution: Won't Do
-
None
-
Component/s: None
NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.
When opening dashboard, the methods below slow down in our customer environment.
- LabelManager.getLabel()
- SpaceManager.getPersonalSpace()
Just after rebooting, it takes 10-20ms to process each methods, but, after a while, it takes around 100ms.
We survey this issue and find that this phenomenon could be due to flushEntity of Hibernate.
- FlushEntity of Hibernate is quickly enough, but sometimes declines in some degree by elapsed time or memory state.(decline around several tens of micro seconds )
- In Confluence, flushMode of Hibernate is configured AUTO and flushEntity is executed when refering.
- FlushEntities calling flushEntity called 11 times when certain user accessed the dashboard.
FlashEntity means the method of SessionImpl. https://bitbucket.org/atlassian/hibernate-2.1.8/src/2366a6e6e48fa7ad8c1c509a9c87fb9811946113/src/net/sf/hibernate/impl/SessionImpl.java?at=master#cl-2492 - Our customer's confluence has a large amount of spaces (The number of Personal space is 4000 and total space is 5000).
They display Favorite spaces on their dashboard.
We confirmed that the value of flushEntity could be changed depending on the order which sort space table by spacename, spacekey and appear at interval of 500, during that process.
The result of the following SQL seems to be the flush.
select space0_.SPACEID as SPACEID, space0_.SPACENAME as SPACENAME, space0_.SPACEKEY as SPACEKEY, space0_.SPACEDESCID as SPACEDES4_, space0_.HOMEPAGE as HOMEPAGE, space0_.CREATOR as CREATOR, space0_.CREATIONDATE as CREATION7_, space0_.LASTMODIFIER as LASTMODI8_, space0_.LASTMODDATE as LASTMODD9_, space0_.SPACETYPE as SPACETYPE, space0_.SPACESTATUS as SPACEST11_, space0_.SPACEGROUPID as SPACEGR12_ from SPACES space0_ order by space0_.SPACENAME , space0_.SPACEKEY limit 2000, 500;
In our customer's dashboard, it took 330ms(30ms x 11) to process this flushEntity and Peformance regression seemed to be occurred by slowing due to memory state.
This issue is similar to the following problem of Hibernate.
- relates to
-
CONFCLOUD-35180 Hibernate queries much slower with FlushMode.AUTO
- Closed