Lock Folder and cyr_expire

Giuseppe Ravasio (LU) giuseppe_ravasio at modiano.com
Wed Mar 4 16:57:53 EST 2015


> I'm using a tmpfs for the Cyrus {configdir}/proc directory, like so:
> 
>   tmpfs   /var/spool/cyrus/config/proc    tmpfs  
> size=25M,nr_inodes=10k  0  0

> Maybe it would be better to create {configdir}/lock as a separate tmpfs?
> Something like:
> 
>   tmpfs   /var/spool/cyrus/config/proc    tmpfs  
> size=25M,nr_inodes=10000k  0  0

Great! I tough that the nr_inodes for a tmpfs could not be set so high
as inode/size ratio! Thnaks.

Shuld be interesting to know how much ram space will need a tmpfs volume
with 10000k inodes used by 0k files!
I couldn't find any information about inode size in tmpfs.

I also did a small test and on my workstation and it turns out that:

Creating 10000 0k files on tmpfs
	(-o size=25M,nr_inodes=10000k) took 8sec

Creating 10000 0k files on XFS loopback device on my SSD
	(mkfs.xfs -i maxpct=0 ) took 9sec

Creating 10000 0k files on XFS loopback device on tmpfs
	(mkfs.xfs -i maxpct=0) took 8sec

> There is no reason for lock files to persist between Cyrus restarts, right?

No. the doc say:
"
There is a new lock folder which defaults to configdir/lock/ and
contains one zerobyte file per mailbox. These can get pretty hot, and
don't need to persist over reboots (they will be auto-created when
needed) - so you may want to define mboxname_lockpath to be on tmpfs or
ramfs or similar. It certainly makes sense to clean it out on restart,
because names will persist in there forever otherwise. Even on mailbox
delete these files aren't removed (to avoid potential race conditions)
"

But if you're using cyr_expire I think that cleaning do not make sense
because at the first run all the files will be recreated.

Giuseppe


More information about the Info-cyrus mailing list