filesystem recommendation please (mailserver)

Posted on 2008-10-31
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.
Question by:ravenpl
  • 5
  • 3
  • 2
LVL 29

Accepted Solution

Michael W 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.

LVL 43

Author Comment

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?
LVL 29

Expert Comment

by:Michael W
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.
LVL 43

Author Comment

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?
LVL 29

Expert Comment

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

ZFS Filesystem for FUSE/Linux
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

LVL 43

Author Comment

ID: 22853762
FUSE - and You saying something about performance! Leave it.

Expert Comment

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?

LVL 43

Author Comment

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?

Assisted Solution

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.
LVL 43

Author Comment

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.

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to Standardise Exchange Webmail email link? 6 53
AWS vpc peering connection 1 42
Why isn't object file created? 6 39
how to rebuild XFS volume from LV 19 28
Import PST to Exchange using Power Shell new-mailboximportrequest command, you can simply import the PST file into Exchange mailbox or archived. To know How to import PST into Exchange  2013 read the complete article.
Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

932 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now