Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What is the best setup for an zpool intended for database big inserts or TCP/IP dumps (i mean sustained high write throughput using 4 disks ?

I want buy 4 Wd RE4 2TB drives and get the more power i can !

i think of

zpool create tank mirror disk1 disk2 disk3 disk4

OR

zpool create tank mirror disk1 disk2 mirror disk3 disk4

OR

zpool create tank disk1 disk2 disk3 disk4

i think the solution with two mirror in a pool is the best, but not sure.

edit : ok so mirror IS RAID1. It is not possible to make this setup : RAID0 (RAID0, RAID0)

share|improve this question

3 Answers 3

up vote 6 down vote accepted

The three commands and ZFS setups you've listed are vastly different configurations.

zpool create tank mirror disk1 disk2 disk3 disk4

This creates a 4-way mirror with the capacity of ONE disk. Lots of protection, less space and less performance.
I don't think you want that.

zpool create tank mirror disk1 disk2 mirror disk3 disk4

This creates a stripe of two RAID 1 mirrors - RAID 1+0, with a capacity of TWO disks.
This is a good balance.

zpool create tank disk1 disk2 disk3 disk4

This creates a stripe of four disks - RAID 0, no protection against failure and a capacity of FOUR disks.
This is fast, but only make sense if you don't care about your data's integrity. If a drive fails, you will lost your data

share|improve this answer
    
I best understand now. I thought it was possible to make raid0 of raid0 but mirror is RAID1 not RAID0 –  Avlin Sep 24 '12 at 12:46
    
RAID0 (RAID0, RAID0) is the same as a three-way stripe... so zpool create tank disk1 disk2 disk3 disk4 would be all RAID 0, and thus, the fastest. But there would not be any data protection. –  ewwhite Sep 24 '12 at 12:59
    
OK Thanks. For me the best setup for programing/ research is two zpool: a 5400rpm raidz with l2arc ssd for all data and stripping with 10k disk no ssd l2arc for serious work. I mean the raidz pool can handle backup from the stripped pool. –  Avlin Sep 24 '12 at 13:07

Here's how mirror and striping work:

  • If you want more write throughput, then more stripes
  • If you want more fault tolerance and read performance, then more mirrors

So with 4 disks, the best way to achieve the most throughput without sacrificing fault tolerance is to create 2 mirrors, allowing the data to stripe over the mirrored pairs.

To take this further, if you had six disks, this configuration would give you more write performance:

zpool create tank mirror disk1 disk2 mirror disk3 disk4 mirror disk5 disk6

And this would give you more fault tolerance:

zpool create tank mirror disk1 disk2 disk3 mirror disk4 disk5 disk6
share|improve this answer

As I understand you'll do massive writes (vs a lot of small random writes), raidz might be a good space/redundancy compromise:

zpool create tank raidz disk1 disk2 disk3 disk4

Capacity of three disks, survives one disk failure.

share|improve this answer
    
yeah, i have already a raidz of 5 1Tb caviar green but write IOPS seems not sufficient (for me). And you are limited with record size, expecialy on raidz and 4k drives. –  Avlin Sep 24 '12 at 13:38
    
@Avlin Side note: RAIDz is RAM hungry, you'll get marginal performance unless you throw gigs of RAM at it. The processor has to be decent as well... –  Chris S Sep 24 '12 at 14:06
    
That's it : raidz for movies and backup, zpool stripping and mirroring for databases and VMs. –  Avlin Sep 24 '12 at 14:38
    
I understood the question to be about throughput (a small number of big writes) while if the goal is iops (a large number of small writes), raidz is indeed not optimal. –  jlliagre Sep 24 '12 at 16:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.