Le 7 déc. 2011 à 21:05, Paul Libbrecht a écrit :
I can use the StatisticListenerImpl which gives fairly
high numbers:
StatisticListenerImpl: Hit = 9583563 /
1320251374, stale hit = 0 / 538, miss = 8541 / 17175236, flush = 27348, entries (added,
removed, updates) = 25457741, 0, 7678101
these numbers are integers, and might
actually be too small for the 2billions limit of an int, they are static (so count
"all the OSCache instances").
And it did spin to negative already several times. How delicious!
What I would like to get is the "eviction
rate" but I do not know how to compute it.
That is, I wish to read the number of cache-entries which are thrown away because the
cache is full and others come in.
I simply counted differences between snapshots the number of adds minus the capacity.
If the caches are full (which is the case after about 2 minutes after starting curriki),
this gives a faithful estimate.
Until the number of adds becomes negative ;->.
Once I can have it, I can start tuning (cache size,
less greedy algorithms, ...) and measure the effect of such tuning. We have plenty of RAM
space to accommodate the cache but we should use this well.
Well, we just had a restart because the appserv was sweating 1700% and had 23 threads
executing the same place:
at com.opensymphony.oscache.base.Cache.dispatchCacheMapAccessEvent(Cache.java:907)
(somewhere behind a getFromCache)
Trying to understand what would have caused this, I could not understand it.
The big annoyance with this process is that it can
only run on our production server. So thus far I did not dare register a CacheListener in
groovy fearing it would suddenly be slow.
Can anyone state me a danger of doing so?
Has anyone used a different strategy or tool?
I've discovered that Zabbix would have a time-synched view (or close to it). Did
anyone try Zabbix with XWiki?
Indeed Vincent, that would leverage JMX so it could be used directly for XWiki.
Can the eviction-rate be computed with this? I was surprised to find the tool-set of
OSCache's statistics quite meager.
I'm happy to post my little monitor script.
The cache monitor is here:
http://www.curriki.org/xwiki/bin/view/CurrikiCode/CacheMonitor
(publicly accessible) with the stats disabled.
thanks in advance
Paul