Postfix spool on ext3 optimiziations in >=linux-2.6.34 days
Posted
by Luke404
on Server Fault
See other posts from Server Fault
or by Luke404
Published on 2010-06-16T10:34:02Z
Indexed on
2010/06/16
10:43 UTC
Read the original article
Hit count: 407
Given the very specific nature of the subject (we're not talking about mailboxes, just the spool; we're not talking about other filesystems, just ext3; and so on...) and the maturity of the softwares involved (linux kernel, ext3fs, postfix) I'd think there should be a more or less agreed on set of best practices to filesystem related tuning.
I'm trying to get a roundup of them:
data=journalbecame the default in recent kernels (somewhere around 2.6.30 IIRC) so we should be ok with that- Wietse Venema says
atimemust be on, but Postfix documentation recommendsnoatimewhile talking about the Incoming Queue. Does that mean that postfix needsatimeon just for some queue directories and will benefit fromnoatimeon the others? can we usenoatimeif we just don't use ETRN? - filesystem can be mounted
nodev,noexec,nosuid- no* won't prevent you from setting attributes (postfix uses exec attr) they just won't have any effect (we don't run anything from the spool) - the
fsync()issue cited by Wietse and/or thechattr -Sare probably linked tosync/asyncoptions of ext3fs but I do not understand them enough. Mouting the filesystem withasyncoption is equivalent tochattr -R -Sthe whole fs? Seems like it will increase performance, but will that pose a risk of "loss of mail after a system crash" or is it really "safe on /var/spool/postfix" ? - would you tune anything else on postfix-2.6.x to work better on ext3 or do you leave defaults everywhere?
- is there a "best" linux I/O scheduler for this kind of workload (namely CFQ or deadline?) or that's something that will vary too much based on hardware configuration?
- would you tune anything else in the filesystem or in the kernel?
- anything else?
References:
- Postfix Performance here on SF
- Postfix documentation about the Incoming Queue
- Wietse Venema in Best file system on [email protected] here
- Postfix and ext3 on [email protected] here and there
© Server Fault or respective owner