Re: raid 1 vs raid 0+1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 29, 2002 at 01:29:23PM +0100, Antonello Piemonte wrote:
> Hello
> 
> I have a server wich I would like to set up with
> mirroring for some data protections (against disk failure).
> the machine is supposed to deal mostly with writing of
> lots of small files (2kb perhaps 4kb each) to disk (well, array)
> and the goal would be to be able to write at least few hundreds 
> files per seconds (!).
> 
> the question is: for performance, is it better a raid 1 or a 
> raid 0+1 configuration? is the above load (number of files written
> per second) a realistic goal to attain with a SCSI based uniprocessor PIII 
> 800MHZ with ext3 file system (this I will tackle separately, perhaps
> will use ext2 to increase performance) and 1 Gig of RAM? 

On a dual PIII-550 with 512 MB of memory, ext3, and a RAID-0+1 (four 40G
7200rpm IBM IDE Deathstar disks, 64k chunk-size on the RAID-0), I get:

$ time for i in {0,1,2,3,4,5,6,7,8,9}; do mkdir $i; for j in
{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}; do dd if=/dev/zero of=$j/$i
bs=1k count=4; done done

real    0m5.024s

So, 5 seconds for writing one thousand 4 kb files *sequentially*.

Note that I only put 100 files in each directory - if I put 1000 files
in one directory, performance would degrade (more significantly when the
number is, say, 10000).

You may want to experiment with ext3 journalling options - you may see
better performance on data=journal mode, if you write the files in
bursts (with some longer pauses in between).   I cannot give you any
certain advice here, other than to experiment.

RAID-0 will probably allow you to scale better, but I'm really not sure
how the performance on this rather perculiar workload changes as you add
disks - in any case it will be *highly* filesystem dependent.  You
should definitely also try out ReiserFS and eventually JFS, XFS, and
perhaps even one of the FAT variants (yes, FAT is actually *very* fast
for some very particular workloads, because it is so primitive (eg. it
gets less in the way) - at least this used to be true, but I do not know
if it is still so, and I'm not sure about your workload either).

So in short; Everything I said here except for the 5 second benchmark is
guessing...  Now you go measure  ;)

Please, if you do decide to measure, do post a summary here to the list.
I'm sure people will find it interesting, and it will appear in the
archives for the next person with the same problem to find.

Cheers,

-- 
................................................................
:   jakob@unthought.net   : And I see the elder races,         :
:.........................: putrid forms of man                :
:   Jakob Østergaard      : See him rise and claim the earth,  :
:        OZ9ABN           : his downfall is at hand.           :
:.........................:............{Konkhra}...............:
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux