UFS2 optimization for many small files

Chuck Swiger cswiger at mac.com
Wed Mar 12 19:18:30 UTC 2008

On Mar 12, 2008, at 11:44 AM, Angelo Turetta wrote:
> I then proceeded to copy my cyrus-imapd partition from /usr/local/ 
> mail (on /dev/da0s1f) to the new 76GB /mail (/dev/da2s1d). During  
> this copy I noticed the disk usage of the mailboxes (as reported by  
> du(8)) growing about 20% larger in the process. Please note that  
> cyrus stores mailboxes with 1 file per message, 1 directory per IMAP- 
> folder, and the moved files are in the order of the hundred- 
> thousands, with half of them less than 8 KB large.
> I tried understanding where the difference was, but I cannot work- 
> out any cause in the file systems:

I believe Cyrus will create hard links if the same email message is  
kept in multiple folders.  If your copy did not preserve hard and  
symlinks, the extra space growth might be a result...consider retrying  
the copy using the options to rsync/tar/whatever to preserve the links.


More information about the freebsd-questions mailing list