Are you sure this will actually speed up XMail? Have you been able to compare, specifically for XMail?

As far as I understand how XMail processes e-mails, it actually only creates a file one time and then moves that file around between temp-folder, spool folder and local POP3 folders. Moving a file on the same filesystem means the file isn't re-rewritten. If you move a file between different filesystems, it does need to be re-written. That could actually mean that having the temp folder on a RAM-disk might slow things down if there would be an event in which XMail moves a file from spool to temp to local POP3 folder. When they are all on the same filesystem, this would mean the file would need to be written only once (and then moved around). If the temp folder is on a different file-system, this would cause the file to be writting to the hard drive twice and to the RAM-drive once.

All mails will not only pass through the temp-folder, but will also end up in the spool-folder. If most mails only pass through the server (and don't need to be stored locally) then you might be able to see a speed improvement by also placing the spool folder on a ramdisk. But this would mean that all mails pending delivery are lost at server restart (so this isn't really recommended).

Sincerely,
Bart Mortelmans


U.Mutlu via xmail schreef op 25/05/15 om 01:09:
Tip: Speeding up xmail by pointing envvar XMAIL_TEMP to a ramdisk
(here on Linux using a 64 MB ramdisk mounted to /mnt/ramdisk )

mkdir -p /mnt/ramdisk

in /etc/fstab:
tmpfs  /mnt/ramdisk  tmpfs  nodev,size=64M  0  0

then either reboot or use this cmd:
mount /mnt/ramdisk

in xmail start script:
export XMAIL_ROOT=/var/MailRoot
export XMAIL_TEMP=/mnt/ramdisk
export PATH=$XMAIL_ROOT/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
...

and restart xmail.

The ramdisk size should be bigger than "MaxMessageSize" (unit KB) in server.tab.

This will speed up mail processing (at least incoming mails) significantly.
Here's more info about speed gains:
http://www.jamescoyle.net/knowledge/951-the-difference-between-a-tmpfs-and-ramfs-ram-disk "The major benefit to memory based file systems is that they are very fast – 10s of times faster than modern SSDs. Read and write performance is massively increased for all workload types."

One can even copy the mostly called programs (for example filters) onto the ramdisk, but then one must use such a PATH line (instead of the above one): export PATH=/mnt/ramdisk:$XMAIL_ROOT/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin


_______________________________________________
xmail mailing list
xmail@xmailserver.org
http://xmailserver.org/mailman/listinfo/xmail

Reply via email to