Mark Martinec (Mark.Martinec+amavis) writes:
> > so :-) ), I'm more on the linux side. But what I think linux (and
> > probably FreeBSD too) would do in case of the temporary files
> > amavisd-new creates is that those files are never written out to
> > disk due to their short lifetime but instead kept in memory.
> 
> Yes, this is the general idea. Similar can be achieved by
> turning off synchronous writes of fs metadata on traditional
> file systems.

        You don't want to turn off synchronous metadata, at least not
        directly :)  You want metadata reordering, like BSD SoftUpdates
        does, so that you avoid committing to disk data which will disappear
        within the next update window.  Making the FS / partition asynchronous
        is a sure way of ending up in  single user mode, running fsck manually
        to recover at the next crash.

> Provided that a partition is dedicated to
> temporary and scratch files and nothing else, it would be
> safe to do so.

        In that case, yes, but have a script newfs said partition on every
        boot then, to avoid any unexpected inconsistencies.

> The same holds for RAM cache in cheap IDE
> disks, even without battery backing. Certainly this would
> be a no-no if other data is stored on such disk, but is
> perfect for scratch storage, and fast too, not sacrificing
> system memory.

        Side note: 99% of all IDE disks have write cache turned on by default,
        which can bite quite hard in case of power outage.  This is because
        most IDE disks don't support tagging (some do, SATA does quite
        systematically, but OS support is required), so they compensate
        by lying to the OS about when the data is written to disk.

> Dedicating it
> to a ram file system makes it dedicated to such use only
> and most of the time such partition would wastefully be
> mostly empty, except when some exotic mail explodes to large
> size during decoding.

        vfs backed ramdisks (FreeBSD for example) only use memory when
        files are allocated.  Removed files free up the corresponding memory
        backing.  So you only use as much memory as is necessary.

        Phil


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to