[Dovecot] dovecot and nfs readdir vs readdirplus operations

Timo Sirainen tss at iki.fi
Thu Jul 5 16:21:03 EEST 2012


On 5.7.2012, at 15.55, Angel L. Mateo wrote:

> 	I think you are right. I guess that the differnce between my old system (who uses readdir and readdirplus) and the new one (which just uses readdirplus) is because of changes on the kernel. For some threads I have read (for example, http://www.spinics.net/lists/linux-nfs/msg19957.html) it seems that from some version in kernel source (2.6.36 if I remmeber well) some nfs improvements related with readdir and readdirplus (that makes nfs client only uses readdirplus when it was better) and recents kernels always use readdirplus.
> 
> 	Concluding... in my systems, with users with hugh mail folders (thousands of mails) in maildir format, disabling rdirplus with mount options (mount option nordirplus) increases performance (maybe we could do more precise test and this could be documented in dovecot's nfs documentation)

If readdirplus requires filesystem to do stat()s on each file, then that's definitely bad and not something Dovecot needs. The only use is when listing files in ~/Maildir/ and determining which ones are directories and which ones are files. But even that defaults to assuming that everything beginning with "." is a directory if the readdir() call didn't specify it, and in those systems where this isn't true you can set maildir_stat_dirs=yes setting.



More information about the dovecot mailing list