[Dovecot] Maildir and counting inodes
I've been testing with alpha 3 and I am about ready to go production. I am switching from mbox to maildir and I'd like to know if there is a formula or rule of thumb for determining if your file system will have enough inodes to handle all the mail message files.
I could write a script to look at each user's mbox files, count the number messages and calculate the average number of emails per user, then add a fudge factor for expected growth. However, I doubt anybody actually goes to this much trouble to plan ahead. Or do they?
I'm running Solaris 9 and when I created the file system I just used the defaults. If I need to change anything, I'd rather do it before going production. Thanks for any info you can provide on this subject.
Andy Cravens wrote:
I could write a script to look at each user's mbox files, count the number messages and calculate the average number of emails per user, then add a fudge factor for expected growth. However, I doubt anybody actually goes to this much trouble to plan ahead. Or do they?
The other approach is to work out the average size of emails and your spool disk size and adjust inode count (and block/frag size) to that (assuming you can adjust block size on your filesystem)! This turns the "have I got enough inodes?" problem back into the already-familiar "do i have enough disk space?" problem.
My gut feel says go with 4k/1k blocks and 1 inode/8k sounds about right.
Andy Cravens acravens@uen.org wrote:
I've been testing with alpha 3 and I am about ready to go production. I am switching from mbox to maildir and I'd like to know if there is a formula or rule of thumb for determining if your file system will have enough inodes to handle all the mail message files.
I could write a script to look at each user's mbox files, count the number messages and calculate the average number of emails per user, then add a fudge factor for expected growth. However, I doubt anybody actually goes to this much trouble to plan ahead. Or do they?
I'm running Solaris 9 and when I created the file system I just used the defaults. If I need to change anything, I'd rather do it before going production. Thanks for any info you can provide on this subject.
I've been down this path before -- I recently completed a transition from UW IMAP to Dovecot and from mbx files to maildir -- in other words from about 160 GIGANTIC files to zillions of tiny files. The aggregate size was just slightly over 2 gigabytes.
I used a fragment size of 1024 and a NBPI (number of blocks per inode) of 2048 and find that I didn't quite achieve the balance between blocks free and inodes free that I'd wanted. Not a big deal since I don't have hundreds of users and can always copy the filesystem if I feel compelled to deal with the inode count. So if this isn't as easy for you, you'll probably want to do better than my SWAG. In any case, I probably underestimated the number of files with large attachments in my own mail archive.
participants (3)
-
Andy Cravens
-
Gregory Bond
-
Jon Roma