Reduce iowait in Plesk: put qmail's queue on a ramdisk

I really dislike qmail. But, since I use Plesk, I'm stuck with it. However, I found a way to improve it's awful mail queue performance by putting the mail queue onto a ramdisk. This is actually pretty darned easy to do.

First, toss a line like this into your /etc/fstab:

none    /mailqueue      tmpfs   defaults,size=100m,nr_inodes=999k,mode=775      0       0

This will make a 100MB ramdisk on /mailqueue. Now, just symlink /var/qmail/mqueue to /mailqueue and move your e-mail over:

# mount /mailqueue
# chmod 750 /mailqueue
# chown qmailq:qmail /mailqueue
# mv /var/qmail/mqueue /var/qmail/mqueue-old
# ln -s /mailqueue /var/qmail/mqueue
# rsync -av /var/qmail/mqueue-old /mailqueue

This has significantly cut the iowait on my server during heavy e-mail periods. In addition, tools like qmHandle now fly through my mail queue and give me reports very quickly.

Printed from: http://rackerhacker.com/2008/03/14/reduce-iowait-in-plesk-put-qmails-queue-on-a-ramdisk/ .
© Major Hayden 2012.

4 Comments   »

  • caleb says:

    The downside to using tmpfs (http://en.wikipedia.org/wiki/TMPFS) is that all messages in your queue will be lost if the server is rebooted.

  • major says:

    At least you get the benefit of removing all of the spam e-mails being sent from compromised user accounts. :-)

  • breun says:

    Did you try increasing some of qmail's concurrency settings? Worked for me.

  • argonius says:

    @breun:
    To which value do you increased your concurrency settings? I use 50 for local and remote.

    @rackerhacker:
    Do you realy using the original qmHandle on Plesksystem?? You should better use mailqueuemng ( qmHandle stolen by parallels :p )

Trackbacks/Pingbacks

  1. Put a Qmail queue on ramdisk

RSS feed for comments on this post

Leave a Reply

 

  • Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you find the information useful. If you spot something that's incorrect or confusing, please write a comment and let me know. Drop me a line if there's something you want to know more about and I'll do my best to write a post on the topic.
    -- Major Hayden

    Flattr this