I am running UW imapd and dmail with MBX mailbox format. I noticed using
debugfs "stat <file>" that the mail file can get quite badly fragmented
over time.

We run a large predominately mbx-format, with some Unix format, server. We have observed that if we massive copy all files off a large LUN, then copy them back--ie de-fragmenting the file system--the number of IOPs drops. (Such a massive copy requires taking the server out for 6 hours or more.) Thereafter there is a regular increase in the IOPs as the file system fragments over time.

To prevent this, we run a nightly defrag: a Perl script finds files in many fragments. It copies each such file. If the result is fewer fragments, we keep the new file; otherwise we keep the original file.
This helps to keep the IOPs down. However, over time we find this is
less and less effective, because the Linux ext2 filesystem becomes
more and more fragmented; copying a file frequently results in more
fragments then you started with.

If you google the fragmentation issue you will find many sources that perpetuate the urban legend that Linux ext2/ext3 filesystems don't
need defragmenting ...

Perhaps the solution lies in having the operating system automatically defragment files (as Apple MacOS X does with files under 10MB.)

Alex Nishri
University of Toronto
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to