[Building Sakai] Excessive querying of SAKAI_SITE_PAGE_PROPERTYtable in 2.6?

Matthew Buckett matthew.buckett at oucs.ox.ac.uk
Fri Aug 28 02:04:40 PDT 2009


2009/8/27 Joshua Swink <joshua.swink at gmail.com>:
> I haven't inspected our database, but Sakai says this:
>
> org.sakaiproject.db.BaseDbFlatStorage.SAKAI_SITE_PAGE_PROPERTY:
> count:2993 hits:9838 misses:732554 hit%:1
>
> That seems to be a very low hit rate. Would it be helpful to increase
> the size of the cache? How can I do that?

I've just spent a couple of minutes looking at this and my guess is:

- SitePage properties are stored in the SitePage and lazily loaded.
They are also cached so that if you ask for the properties again you
don't have to go back to the database.
- However Sites are also cached and a cached site object can
(optionally) also include the SitePages and the SitePages can
(optionally) also include the SitePage properties.

So if your Site cache is working really well it should mean that your
SitePage properties caches doesn't get hit very often. Depending on
the TTLs on both the caches you may also find that entries fall out of
the SitePage properties cache quicker (becuase they aren't hit) and so
when a site finally falls out of the Site cache and is re-requested
you get a miss on the site cache and a miss for every page in that
site on the SitePage properties cache.

SiteService.findPage(String) is the only(?) way to find a page without
first loading the site, and in it's implementation it just uses the
Site cache anyway.

We also have similarly bad stats for this cache in 2.5.x

org.sakaiproject.db.BaseDbFlatStorage.SAKAI_SITE_PAGE_PROPERTY:
count:385 hits:8494 misses:510466 hit%:1

-- 
  Matthew Buckett


More information about the sakai-dev mailing list