On Fri, 16 Dec 2005, [EMAIL PROTECTED] wrote:
Perhaps the solution lies in having the operating system automatically defragment files (as Apple MacOS X does with files under 10MB.)

Hi Alex -

Thank you for the information. Over the years, I have watched the discussions on fragmentation from the sidelines, and in particular the question of whether fragmentation is actually harmful on ext2/ext3 filesystems. There's been more heat than light in those discussions, so I'm glad to see some factual information.

The cause of the fragmentation is not the overwrite-on-expunge behavior of the drivers in c-client (the library used by UW imapd to access mailbox files), but rather that new messages are appended. There is no good way to prevent fragmentation in a flat file format (either traditional UNIX or mbx format) because the new mail append is when the fragmentation occurs.

The assumption made by filesystems is that software will periodically replace the file with a new copy; and that if fragmentation is avoided when writing new files this will suffice to cure any excessive fragmentation problems.

This assumption is false when c-client is used, since it never writes a new copy of the mailbox; it always updates in place. Normally, updating in place is much better (far fewer writes and no additional disk space consumed), but it doesn't cure the fragmentation and the filesystem was depending upon it to do so.

I don't think that it would be a good idea for c-client to attempt to defragment. It is a time-consuming process, and an unsafe one. But I would consider building a manual defragmentation tool which would be as close to safe with c-client programs (imapd, ipop3d, Pine, etc.) as possible if the community considers it to be worthwhile.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to