|
From: John P. R. <ro...@cs...> - 2013-10-12 01:36:40
|
In message <201...@mx...>, "John P. Rouillard" writes: >It looks like the getnode() call in backends/rdbms_common.py has a >cache in it (self.cache), but it is populating the cache one item at a >time: > > # perform the basic property fetch > sql = 'select %s from _%s where id=%s'%(scols, classname, self.arg) > self.sql(sql, (nodeid,)) > > values = self.sql_fetchone() > >which I think is what you are seeing. I claim you should only see one >request for each user per template regardless of how many times the >user is requested (e.g. assigned to, created by, ... will all need the >user object from the database, but you should only see it being >fetched from the database once, additional fetches should be from the >cache). > >Can you verify this? If so then the cache is working as expected. Also what is the following paramater set to in your config.ini. # Size of the node cache (in elements) # Default: 100 cache_size = 100 In your 30000 user case I would try to increase it if it's still set to default. I would increase it in units of 2000 or so till you get it to something near 30500. Check to see what effect increasing it has on performance. At the 30500 level it should mean that there is only one lookup for each user. Less than that and the earlier entries will be evicted (it's a LRU cache) resulting in multiple lookups. -- -- rouilj John Rouillard =========================================================================== My employers don't acknowledge my existence much less my opinions. |