Jeff Kaufman
unread,Jul 25, 2016, 9:33:16 AM7/25/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pagespeed-dev
Currently our shared memory metadata cache has two options:
1) No L2
2) Write through to an L2
The advantage of (1) is that it's faster because you get to skip a lot
of writes; the advantage of (2) is that you don't lose all your
optimizations on server restart, and if you're using memcached (or
redis, soon) different machines running pagespeed can share the
metadata cache.
Right now we do (1) if you have an explicitly configured shared memory
metadata cache and are using the filecache, and (2) otherwise.
Neither of these are great options, and having a special case
situation that gets you (1) is confusing.
One way to improve this situation would be to switch to checkpointing.
Every five minutes or so we could do a single write to disk to save (a
whole sector of) the shm cache. Then when we're starting up we could
initialize the shm cache from these saved checkpoints. The shared
memory cache implementation supports checkpointing at a low level: it
has AddSectorToSnapshot() and RestoreSnapshot().
I started this in 2014, dropped it when I went on leave, and am
picking it up again now.