From owner-freebsd-questions@FreeBSD.ORG Wed Sep 24 09:01:08 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1657C106564A for ; Wed, 24 Sep 2008 09:01:08 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id C4CC78FC13 for ; Wed, 24 Sep 2008 09:01:07 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KiQF7-0002h2-0w for freebsd-questions@freebsd.org; Wed, 24 Sep 2008 09:01:05 +0000 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Sep 2008 09:01:05 +0000 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Sep 2008 09:01:05 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Ivan Voras Date: Wed, 24 Sep 2008 11:01:26 +0200 Lines: 31 Message-ID: References: <48D95A19.8030700@shopzeus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <48D95A19.8030700@shopzeus.com> Sender: news Subject: Re: dovecot, maildir, UFS 2 performance X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2008 09:01:08 -0000 Laszlo Nagy wrote: > The secondary task for this server is to be an IMAP and mail server. We > will be using dovecot, and shared maildir folders with ten thousands of > messages. I'm not sure where to put the maildir folders, and what > options to use for the filesystem. Dovecot wiki is not talking about > UFS, only ext3, reiserfs and xfs: > > http://wiki.dovecot.org/MailboxFormat/Maildir You can treat UFS as ext2/3 with dir_index enabled by default (not exactly but that's what dirhash translates to in practice). You will probably want to increase vfs.ufs.dirhash_maxmem sysctl to several megabytes if you have large directories. > Can you tell me some basic idea about how to configure this? I have some > ideas but they may be competely wrong: > > #1 maildir stores each message in a separate file. I think I need to > dedicate a separate disk slice for maildirs and decrease block size on > it. How big should the blocksize be? UFS by default creates 2k fragments ("sub-blocks"), so in practice any tuning in this direction won't do much. > #2 searching in messages is a common operation. Possibly read speed is > very most important. But since there will be thousands of files to open, > seek operation is also important. On which RAID array should I put mail > dirs? Small SAS or bigger SATA array? More drives=better in this case. Don't forget to tune dirhash_maxmem.