Solved

filesystem recommendation please (mailserver)

Posted on 2008-10-31
10
486 Views
Last Modified: 2012-05-05
I'm about to setup mail server. It will store user's mails into Maildir format(postfix, dovecot). Storage is ~2TB on LVM w/snapshots.
Now I was thinking about reiserfs as filesystem, but I heard it does not performs so well as rumoured.

So will You recommend me reiserfs or ext3. No other option I accept. Please back up Your recommendation with some tests results(web links) or at least personal experience.
0
Comment
Question by:ravenpl
  • 5
  • 3
  • 2
10 Comments
 
LVL 29

Accepted Solution

by:
Michael Worsham earned 250 total points
ID: 22853477
I highly recommend ext3 over ReiserFS.

Ext3 tends to be more reliable and much easier to recover if something goes wrong. It can be a major headache if the superblocks and/or B-tree of a ReiserFS partition get screwed for some reason and the chances of not being able to fix it are bigger than when using Ext3.

ReiserFS is geared more to small filesets, thus it's journal can get corrupted easily if you have several small files and a number of larger files as well (i.e. mailboxes, log files, etc). Also ReiserFS is known to 'stop' if it encounters bad blocks on a data drive.

In terms of general performance, both Ext3 and ReiserFS are equal, although on small files ReiserFS can outperform Ext3.

References:
https://lists.ubuntu.com/archives/ubuntu-users/2005-March/025591.html
http://forums.suselinuxsupport.de/index.php?showtopic=62656
0
 
LVL 43

Author Comment

by:ravenpl
ID: 22853550
> In terms of general performance, both Ext3 and ReiserFS are equal, although on small files ReiserFS can outperform Ext3.

It's doing to be mailserver/Maildirs, so average filesize I expect is ~12K. Also lots lots of small files in single directory like 1 000 000. Why single mailbox shouldn't occupy 12GB or more?
0
 
LVL 29

Expert Comment

by:Michael Worsham
ID: 22853617
In the past I used the SUSE Professional distro with the ReiserFS file system. The server consisted of a 500GB LVM layout running Apache, PHP and Postfix w/ an average of 5mb mailboxes for 50 users. The one day we had a power spike, the ReiserFS journal took nearly 3 hours to clean itself up.

I switched over to ext3 w/ improved journal support and when the same thing happened again (we found we had a fault power supply), the fsck for the ext3 took about 15 minutes.

Now every server I provision -- whether it be a LAMP server or a simple Xen -- now uses ext3.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 43

Author Comment

by:ravenpl
ID: 22853637
Yea, I would go with ext3 - but those 1000000 files in single dir...

I've read XFS scales very well, yet it lacks journal ordered mode... Anyone to convince me it's not a problem?
0
 
LVL 29

Expert Comment

by:Michael Worsham
ID: 22853735
If you're feeling adventurous, take a look at running ZFS on Linux...

ZFS Filesystem for FUSE/Linux
http://www.wizy.org/wiki/ZFS_on_FUSE
0
 
LVL 43

Author Comment

by:ravenpl
ID: 22853762
FUSE - and You saying something about performance! Leave it.
0
 
LVL 8

Expert Comment

by:Rance_Hall
ID: 22854227
which mailserver are you using?  at least two that I know of have file search code bits optimized for ext file systems.

trying to migrate these to reiserfs can cause unexplained slowdowns.

just to be safe I'd stick with ext2/3

Now, the difference between ext2 and 3  is journaling, jounals are great tools but can slow down disk i/o at the expense of data security for files that are probably only temporary, I mean, you arent going to store already read email on the server are you?



0
 
LVL 43

Author Comment

by:ravenpl
ID: 22854263
> which mailserver are you using?  at least two that I know of have file search code bits optimized for ext file systems.
I told that already - postfix + dovecot. What are those mailservers You referring to?

> I mean, you arent going to store already read email on the server are you?
Of course I am. IMAP is nowadays standard - isn;t it?
0
 
LVL 8

Assisted Solution

by:Rance_Hall
Rance_Hall earned 250 total points
ID: 22854524
sorry I missed the reference to postfix and dovecot in the original question.  my apologies.
the choice of imap/pop doesnt specifically have to do with keeping messages on the server.  imap allows you to have folders and subfolders, both imap and pop allow you to keep messages on the server or not.

its totally up to you, but I have new installations where mail is NOT kept on the server due to disk space considerations and disk quota management.  The client did not feel they could keep up with the task.

qmail is optimized for the ext fs and the name of the second one excapes me right now.

There are three places where you want to pick your file system carefully to optimize performance.

1) the queue, files are written to the queue as part of the inbound/outbound process and are never stored longer and the lifetime of a queue item, the queue life is probably at least three days, so it should be a real disk fs, but since the files are temporary in nature I'd go with a non-journaling fs for speed.

2) the temp space where messages are scanned for spam/virii,  files exist in this state for just long enough for the scanning tools to report pass/fail, they are not stored for more than 5/6 seconds.  This path should be mounted as a ramfs so that ram space is used instead of the disk.

3) the imap repository, the imporance of this of cource depends on IF you are storing your clients mail for them or not, I'm managing installations where it is working both ways.

if you are keeping the files on your drive you are going to want LARGE drive capacity with good performance. spin time, etc.

Reiserfs is better at managing smaller files, and the average text only email with no attachment is a small file.
but attachments can bloat the size of the messages considerably.

ive used reiserfs in the past, but since Hans Reiser went to prison I could no longer justify its use.  Turns out that the project essentially died.  Its parent company Namesys is out of business, and many of the developers have gone on to other things.

choose either ext3 or reiserfs for this, either choice is respectable as far as performance goes, just be aware that reiser probably wont see any bugfixes or updates.
0
 
LVL 43

Author Comment

by:ravenpl
ID: 22857085
I have done some test by myslef comparing reiser to ext3 and still no winner out there.
I've choosed ext3 for it's stability and maturity and such.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Utilizing an array to gracefully append to a list of EmailAddresses
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question