3 Replies Latest reply on Apr 1, 2008 5:27 AM by antoine_h

    Performance with large CMS repository / cache preloading

    frontline2

      I noticed that the portal takes quite long to start up and eats a lot of memory when you have large amounts of data stored in the CMS.

      I tracked this down to the class "JBossCachePersistenceManager", which apparently preloads stuff on startup into its caches.
      A couple of questions:

      - does this class actually read all the data from the database and cache it in memory?
      - is it safe to disable this preloading? An if it's safe what is the correct way to do it (now I just commented out the preloading in the code and the portal seems to be working fine).
      - why is this preloading needed in the first place and can the amount of stuff cached be adjusted somehow, this solution really doesn't scale that well...

      Here are some performance numbers from the preloading, the strings are the hql:s run. The number is the time in milliseconds and the rows are the rows read from the database.

      21:48:16,812 INFO [STDOUT] Time for: from org.jboss.portal.cms.hibernate.state.WSPRefs - 172, rows: 0
      21:48:24,062 INFO [STDOUT] Time for: from org.jboss.portal.cms.hibernate.state.VersionRefs - 7422, rows: 4695
      21:48:24,515 INFO [STDOUT] Time for: from org.jboss.portal.cms.hibernate.state.WSPNode - 7890, rows: 6076
      21:48:33,828 INFO [STDOUT] Time for: from org.jboss.portal.cms.hibernate.state.VersionNode - 17219, rows: 36274
      21:48:47,296 INFO [STDOUT] Time for: from org.jboss.portal.cms.hibernate.state.WSPProp - 30734, rows: 110958
      21:49:32,828 INFO [STDOUT] Time for: from org.jboss.portal.cms.hibernate.state.VersionProp - 76266, rows: 319954