On Jul 30, 2009, at 1:29 PM, Timo Sirainen wrote:

On Thu, 2009-07-30 at 11:30 -0400, Jonathan Siegle wrote:
I recently found out about something called memcached. The goal of
memcached(server)[1] and libmemcached(client library)[2] is to store
maps in memory of tokens. So my key would be "jsiegle_sieve" and my
data would be my sieve file. So instead of the 10-20 million reads to
disk, we would just pull from memory.

Then again, if you have enough memory your OS could be doing that
automatically already.

Good point. AIX does love to use memory to cache filesystems. I think I'll try to do some formal testing. The hooks appear to be fairly easy to put into the sieve code.

Or maybe if the Sieve plugin supports giving a
separate path to downloaded scripts, the destination could be in a
ramdisk or if you're using Linux: http://memcachefs.sourceforge.net/

Also I'm hopefully going to abstracting out filesystem accessing code in
Dovecot's index files and dbox code. Sieve could use this same FS API,
and you could implement whatever backend to actually perform the FS
access, like memcached..


Are you saying that it isn't possible to put the memcached hooks in now until this work is done? It looks like I just put hooks into sieve_script_init() to read from memcached before disk.

-Jonathan

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to