deliver.db in /dev/shm

Bron Gondwana brong at fastmail.fm
Tue Sep 29 18:53:47 EDT 2009


On Tue, Sep 29, 2009 at 04:29:30PM +0200, Carles Xavier Munyoz Baldó wrote:
> Hello,
> May I put the database file deliver.db in the /dev/shm partition.
> 
> I have disabled duplicatesuppression and I believe that I will save lot of I/O 
> requests to my hard drives if I put this file in memory.
> I'am right?

Not heaps really.  Deliver.db IO is pretty low, and mainly affects
lmtp processes - which aren't very time sensitive anyway.

What you might want to do it symlink the $conf/proc directory into
memory somewhere, because that really doesn't have to last over a
restart!

> Which problems will I have with this file in memory? 
> I know that I will lost this database file when system reboots, but this is 
> not a problem for me.
> Will the cyrus create a new deliver.db if it doesn't exist?

It should be fine - except: how are you going to put it in the /dev/shm
partition?  It sits in the $conf directory, so you really need to symlink
it out.  I'm not convinced cyrus will create a new one over a symlink.

Also, I don't know how happy BDB would be.  It uses environment stuff in
$conf/db/ as well.  Skiplist would break on the first checkpoint, because
it would create a new file in $conf/deliver.db.NEW, and then rename that
over the symlink.

That said - if you patched a new deliver.db location into the code, that
would work fine!

Bron.


More information about the Info-cyrus mailing list