[horde] memcache session stats (was Re: memcache caching for all session stores..)
Michael M Slusarz
slusarz at horde.org
Mon May 5 19:45:22 UTC 2008
Quoting liamr at umich.edu:
> Back in Horde 2.x, we used the mysql session handler, and we collected
> a couple of years of data checking how many session modified in the
> previous half hour, on the half our. It was easy to get, easy to
> graph, made managers happy, etc.
>
> When Horde 3.x came out, the session size increased dramatically, and
> the sql based session handler caused our mysql servers to regularly
> reach the 32bit 2gb process memory limit, which would cause mysql to
> crash.. so.. we backported the memcache session handler from CVS to
> 3.0.x. It works great, but doesn't give us quite the same stats that
> my managers want to get (number of users / period X). The graphs show
> the same usage pattern, but are based on different metrics.
FWIW, now that caching has been worked out better, session sizes in
3.2 are dramatically smaller as we are no longer storing complex data
objects in the session.
> So, if we were interested in collecting session statistics, do you
> think it would be easier to use a memcache cached DB based session, and
> check session_lastmodified? Or can we get that sort of info from the
> memcache only session handler? (It's been implied that we can, but
> I've not been successful).
If you are using a persistent session storage backend, obviously you
should query that device if at all possible. The only reason you
would need to use the memcache tracking tables is if you were using a
memcache-only session backend. Since there is no easy way of querying
active entries in memcache, any direct query of memcache using various
hacks is necessarily going to be very slow.
michael
--
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the horde
mailing list