incoming directory

Julian Field mailscanner at ecs.soton.ac.uk
Mon Nov 25 19:10:33 GMT 2002


At 18:41 25/11/2002, you wrote:
>John Rudd wrote:
>>Has anyone explored the bennefits or problems with putting the incoming
>>directory onto a ramdisk?  I know mailscanner preferes to have it on the
>>same partition as the mail queue directories, but I'm wondering if it
>>might be faster (for the scanning part of the process).
>
>Isn't the scary thought that if the power goes you lose all the incoming
>mail that hasn't been processed yet? (or do you have a truly UPS?)

On another point about this, I asked around some people who know a lot more
about the internals of operating system design than I do.

By putting the directories into a ramdisk, you are forcing the OS to use a
fixed amount of ram for this. In general, it is better to leave the OS to
manage system resources itself, as it's usually better at it than the
"fixed" value you give by having it in a ram disk.

Running off real disk, the only things that will be immediately written to
the disk are the inode updates (e.g. creating a new file). Everything else
(including the contents of the files) is cached in RAM. As MailScanner
creates and then deletes quite a few files (the "incoming" directory
contents) many of these will never actually hit the disk at all, apart from
a few inode updates.

So my advice would be to not use a ram disk and let the OS manage your ram
usage.
--
Julian Field                Teaching Systems Manager
jkf at ecs.soton.ac.uk         Dept. of Electronics & Computer Science
Tel. 023 8059 2817          University of Southampton
                             Southampton SO17 1BJ



More information about the MailScanner mailing list