Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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=journal became the default in recent kernels (somewhere around 2.6.30 IIRC) so we should be ok with that
  • Wietse Venema says atime must be on, but Postfix documentation recommendsnoatime while talking about the Incoming Queue. Does that mean that postfix needs atime on just for some queue directories and will benefit from noatime on the others? can we use noatime if 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 the chattr -S are probably linked to sync/async options of ext3fs but I do not understand them enough. Mouting the filesystem with async option is equivalent to chattr -R -S the 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 postfix-users@postfix.org here
  • Postfix and ext3 on ext3-users@redhat.com here and there
share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Given the specific nature, I tend to use default settings. In my case, postfix was never really the bottleneck and I and I spent most of my time tuning AntiSpam/AntiVirus/MDA.

Rianto Wahyudi

share|improve this answer
    
Agree. Instead of tuning ext3 probably you'll get much better performance just change the file system. But as said, most of the time the bottlenecks of a mailing system is not the smtp daemon but all the other apps running together with it. One of the most increase in speed i got it running amavis tmp in a ram disk. –  Pier Jun 16 '10 at 11:01
    
I appreciate your suggestions, but the mail scanning stuff is entirely another story and not the topic here. When you start to grow traffic on your mail server, the content scanning is usually on different hosts than the edge Mail eXchangers. They also tend to have entirely different problematics when getting to performance optimizations. –  Luke404 Jun 16 '10 at 12:09
    
If the traffic grows, you just add more server ( eg postfix+antispam) I don't see the point of having different host doing just content scanning. Passing mail to different host require additional transport method which increase latency & complexity ( eg mail has to be sent to the scanning host , scanning host has to accept, queue & verify that the mail has been accepted, scan the message and notify the sending server if the mail is spam or virus). –  Rianto Wahyudi Jun 17 '10 at 9:29
    
Keeping things as simple as possible allows you to add more servers quickly. With mail server, having 2 less powerfull server is better than having 1 powerfull server. If you manage more than 10 inbound SMTP servers, the performance vs benefits of configuring every little detail is just not worth the time. Linux & postfix also getting better everytime and further down the road you probably dont need to do these tweaks ( example of this is tuning shmax kernel parameters) –  Rianto Wahyudi Jun 17 '10 at 9:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.