Date: Wed, 28 Sep 2005 22:11:08 -0400 From: Mike Meyer <mwm@mired.org> To: aanton@smtpx.spintech.ro Cc: freebsd-hackers@freebsd.org Subject: Re: journaling fs and large mailbox format Message-ID: <17211.19772.562587.908715@bhuda.mired.org> In-Reply-To: <433B3F41.8060004@spintech.ro> References: <433B3F41.8060004@spintech.ro>
next in thread | previous in thread | raw e-mail | index | archive | help
In <433B3F41.8060004@spintech.ro>, Alin-Adrian Anton <aanton@spintech.ro> typed: > I am in the position to implement a large-scale mail server and I will > never go for anything else but FreeBSD (fixation?). How are users going to get to the mail? Web browsers? IMAP? POP? > I don't know if the mbox format can handle this, and I know Maildir > cannot handle this on UFS2 standard install, no matter of soft-updates. > (because it exhaustes the free nodes) So I currently have no solution > for this stuff. Large mailboxes in mbox format are a loss, because you have to rewrite all/most of the mailbox to make changes in it. In particular, a fetchmail process - read and delete the messages in chronological order - is an O(n**2) process. This applies to pretty much any mail format that stores all the messages in one file. The alternatives are things like mh and Mailder. Yes, those will have problems on UFS file systems that you build with the default parameters. That's because mail messages tend to be very small files - typically a few k - so a file system full of them is will have a very odd distribution of files sizes when compared to more usual file systems. The solution isn't to avoid Maildir/mh - the solution is to tune the file system for the expected usage. FreeBSD (and Unix in general) gives you lots of knobs to deal with things like this. Learn to use them. The default block and frag size are relatively large - 2K and 16K appear to be the defaults on 5.x. A quick look at my mail for 2005 shows 32,267 messages ranging from 280 bytes to 6+ meg, with a mean size of less than 8K. I'd go with 4k blocks and a 512 byte frag size - because that will give you four times as many inodes as the default parameters. 8K/1K is also tempting, but you'll probably want to specify -i 2048 to get the same number of inodes as you get with a 4K/512b file system. > I was wondering what is the status of Journaling File Systems on > FreeBSD? Any which is usable and mature, with write access? XFS would > fit amazingly well with Maildir, but.. I doubt it's anything else but > readonly. Neither journaling nor soft updates would solve the problem of running out of inodes. The only solution there is more inodes. XFS may be flexible enough to deal with file systems that far from the norm - but I wouldn't write a business plan based on it without checking first. <mike -- Mike Meyer <mwm@mired.org> http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?17211.19772.562587.908715>