Trying to 'dump' all data in memcache to disk
Marcus Rueckert
darix at web.de
Tue Apr 24 02:20:41 UTC 2007
On 2007-04-23 18:17:49 -0700, Sam Magister wrote:
> I'm running memcached v1.2.1 with the python API v 1.34. I'm keeping
> a rather large number of key/object pairs in memcache (about 2
> million) which take up about 2GB of space in RAM. It takes a long
> time to load all the objects from a database. To expedite this, I
> would like to load it once for the database and then transfer what's
> in RAM to disk so I can load back into memcache in case of a crash.
>
> So basically I'm looking for a way to dump the entire memcache to a
> file and then load it back up again.
>
> I found somthing to that effect here, but it seems like it actually
> can't be done presently.
> http://lists.danga.com/pipermail/memcached/2007-April/003905.html
>
> If anyone can tell me for sure it can't be done, that would be useful
> so I can stop looking.
>
> What I'm considering doing is grabbing all the objects key by key,
> then appending them to a list in python, pickling that list and then
> saving it to disk. Loading them would work the other way around.
>
> But if it's possible to do this without python that would be very
> convenient.
1. you cant iterate all keys! (this is a FAQ)
2. maybe you want: http://meta.wikimedia.org/wiki/Tugelacache
darix
--
openSUSE - SUSE Linux is my linux
openSUSE is good for you
www.opensuse.org
More information about the memcached
mailing list