[Dovecot] FreeBSD, Dovecot and ZFS

Xin Li delphij at delphij.net
Wed Feb 13 02:43:31 EET 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 2/12/13 1:25 PM, Jason Lock wrote:
> Mail Issues - FreeBSD
> 
> Hello, my apologies if this may be the wrong forum but hoping that 
> maybe someone might be able to provide some insight.
> 
> Have a very sporadic and strange issue with our mail servers
> running Dovecot on FreeBSD.  There are three servers hosting
> Dovecot with FreeBSD as the underlying operating system.  All three
> connect to a NAS server, again running FreeBSD and ZFS.

Speaking for NFS on FreeBSD, please note that the FreeBSD NFS client
and server generally respects application's sync() operations which
could cause delays, if the backing pool is not configured with any
fast ZIL device, ideally a SSD.  Normally a 'gstat -I 1s' on the NFS
server will give you busy disks with small throughput, in this case, a
ZIL would be helpful.  Before buying a SSD, you may want to try
disabling 'sync' on dataset (be careful though, that doing so would
increase the chance of data loss in the event of power loss, make sure
to revert the change with 'zfs inherit sync' on the datasets once you
are done with experiments) and see if that helps, if so, then a SSD
ZIL would be helpful; higher end systems can use a Fusion IO or
ZeusRAM for that purpose.

Another possible cause is compression, at this time, FreeBSD's ZFS
compression thread runs at kernel priority and that would cause the
system to do ZFS compression before doing everything else.  If you use
compression=gzip, you will see stalls more often, for short term,
please consider using compression=lzjb or have dovecot to do the
compression; for mid term, please use my recent LZ4 port that would
consume way less CPU and have better compression ratio than lzjb; for
long term, we are going to implement a scheduling policy which is
similar to Solaris's System Duty Cycle and have the compatibility
shims to emulate that.

Lastly, try increasing your NFS iod numbers.  The system default is
very conservative and may become a bottleneck when you have a lot of
users on one system.

Hope this helps...  If you have further questions about FreeBSD please
consider posting to freebsd-stable at freebsd.org .

Cheers,
-----BEGIN PGP SIGNATURE-----

iQEcBAEBCAAGBQJRGuGyAAoJEG80Jeu8UPuzWdYH/iybDczQnLzvlzKfrGn/Kdm7
197P2wK4phktNJVrNjYKFYc8CqelcLoSfZiRGDc3CxpmKnrwRkUWnZMXfpYUVJVL
3SSpmNY73h4atrEpyyoKmz4tIxJp7c24IB8201j/vc09yEaooy2dc9pJrJ5cAcjz
d7eSidcQQk8VdqCBk8haDpB2igZZXWz8zgZ8mKPcqSkGuxZkzZwZCkZc7XfPsCGK
GKswLtXutHA19mKs+wBLJ1r+ZQxabI8ZwQi1V2+VBFz4a5edkQJVbW6VvFSmzjO9
HfbW0uO+wJztSHiceKEUiJ7bIm5ygolhA2BvZ5WlY2VkejXbN6nfQkOlvmDeS0s=
=sMYy
-----END PGP SIGNATURE-----



More information about the dovecot mailing list