[Mimedefang] ramdisks on Linux

Chris Myers chris at by-design.net
Tue Mar 16 18:09:23 EST 2004


----- Original Message ----- 
From: "Aaron Paetznick" <aaronp at critd.com>
To: <mimedefang at lists.roaringpenguin.com>
Sent: Tuesday, March 16, 2004 4:28 PM
Subject: Re: [Mimedefang] ramdisks on Linux


> Yeah I was just shooting from the hip trying to find some other way to
> remove as much I/O from my physical disks as possible.  I'm building a
> pool of more-or-less "disposable" front-end filter servers.  If I could
> move EVERYTHING of any significant I/O onto a ramdisk, I might be able
> to get by with cheap/slow SATA drives, even for a machine with very high
> load.

Also look at hardware ATA RAID controllers such as the 3ware Escalade.  You
can mirror/stripe disks to gain performance.  Put enough disks in the array
and you can beat a smaller number of SCSI disks handily.  The Escalade uses
hardware for RAID5 checksum calculation if you go that way, which is a
significant performance boost over doing it in software.  You can get an
older-model Escalade 7000 or 7500 PATA controller for a couple hundred $$$.


Mount your disks with the "noatime" option to cut down on largely useless
disk writes.

Put a LOT (2GB or more) of RAM into your system and let the O/S use the
extra for filesystem caching.

> Are there any other directories I could consider running on a ramdisk?
> Are there any "write-through" ramdisk options that might be sendmail
> mqueue safe?

/etc/mail/spamassassin/bayes ... Putting the Bayesian database on a RAMdisk
is a great performance boost, but you need to remember to back it up every
day or week (it doesn't hurt to lose a few days of data), and restore the
backup whenever the system boots.  This is a big win.

/var/spool/MIMEDefang ... Putting the MIMEDefang spool files (but not the
quarantine) on a RAMdisk is safe and helps performance.  This is a big win.

/var/spool/mqueue/xf if you split your spool files across several
directories.  NEVER mount the /df or /qf directories on a RAMdisk, since you
can lose mail when your system crashes or is rebooted.  This should be a
moderate win.

/etc/mail ... This is a "read-only" directory for normal mail operation (all
changes are manual, and infrequent), just restore it's contents whenever the
system boots.  Sendmail reads these files each time a new sendmail process
is created, and some of the files for each mail message.  Don't forget that
you'll have to update the on-disk copy of the configuration files on those
rare occasions when you actually have to.  This is likely a small win since
the most commonly used files will be in the filesystem cache anyway...

Chris Myers
Networks By Design



More information about the MIMEDefang mailing list