[Samba] suggestions for a "fast" fileserver - 1G / 10G

Emmanuel Florac eflorac at intellique.com
Mon Mar 24 10:53:49 MDT 2014

Le Tue, 25 Mar 2014 00:04:26 +0800
Chan Min Wai <dcmwai at gmail.com> écrivait:

> About RAID 5/6
> I read some suggestion that we should use Raid 1+0 than raid 5/6
> because of the read and write speed...
> What do you think about that part?

It depends on many parameters, really. RAID-10 is better at writes and
rewrites; modifying an already allocated block has no negative impact
on RAID-10. However it's very uncommon to modify existing data
extensively on file servers.

It also depends on the number of drives you have, and the RAID
controller you're using. with 4 or 6 drives, RAID-10 is probably better
overall. However starting with 8 drives it begins to fall behind modern
RAID-6 controllers, even for write speed (but not rewrite speed).

Here's the catch: RAID-5 and RAID-6 use striping. Basically, that
means that sequential reads are very efficient (about as fast as a
RAID-0 with the same number of drives), random reads are quite
efficient (because you can access drives separately), and sequential
writes are also very efficient (with good controllers, as fast as
number of drives minus parity drives).

However, if you modify a block without rewriting the entire stripe
(across all drives), you must either reread all the other data blocks
from the stripe to or reread old parities and the overwritten data
blocks to recompute parities.  Therefore random writes/rewrites suck,
because each write operation becomes 3 reads (old block, 2 parities)
and 3 writes ( new block, 2 parities) in RAID-6.

As I said however, this is mostly a problem for database, email or
similar applications. For a true fileserver, this shouldn't really be a
problem unless it's chock full with small files (smaller than the
stripe width). Same goes for the filesystem journal that should fits
easily in cache to allow write reordering.

An important tool to measure your disk subsystem activity, by the way,
is iostat. Simply run "iostat -mx 5" in a terminal and check the last
column, "% usage". It gives you a very good idea of how hard your disks
are working. If it stays close to 100% for a sustained period your
disks aren't fast enough.

Emmanuel Florac     |   Direction technique
                    |   Intellique
                    |	<eflorac at intellique.com>
                    |   +33 1 78 94 84 02

More information about the samba mailing list