ZPOOL Mirror setup
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)
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 lose all of your data
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