2008/11/5 Christian Schröder <cs@xxxxxxxxx>: > Tomasz Ostrowski wrote: >> >> This is wrong. RAID5 is slower than RAID1. >> You should go for RAID1+0 for fast and reliable storage. Or RAID0 for >> even faster but unreliable. >> > > I did not find a clear statement about this. I agree that RAID10 would be > better than RAID5, but in some situations RAID5 at least seems to be faster > than RAID1. For certain read heavy loads RAID-5 will beat RAID-1 handily. After all, from a read only perspective, a healthy RAID-5 with n disks is equal to a healthy RAID-0 with n-1 disks. However, writes are much more costly on RAID-5 > If I have 5 disks available, how should I use them to get best performance > without the risk of severe data loss? If I use 4 of the disks to build a > RAID10 then I will have only 1 remaining drive, e.g. to put the pgsql_tmp > directories there. In this scenario I would not have the WAL on a separate > disk. How you use your disks depends very much on your RAID controller and your workload. On a fast controller with battery backed cache, I'd normally create a 4 disk RAID-10 with one disk as a hot spare. If you don't have a battery backed caching controller, then you'd probably be better off with two 2 disk RAID-1 arrays and the 5th drive as a hot spare. Note that a 4 disk RAID-10 or 2 2 disk RAID-1 with a hot spare is much more reliable than a 5 disk RAID-5. > Or should I use 3 disks to build a RAID5, 1 disk for tempspace and 1 disk > for WAL? How important is data integrity for the WAL? If the WAL disk fails, > can this corrupt my data? Or would I just lose the data after the last > checkpoint? If your data is important, then you will put it on redundant arrays of independent disks (RAID). WAL is as important as any other part of the db. It should be on a mirror set at a minimum. > Or maybe I should use 2 disks as RAID1 for the database, 2 disks as RAID1 > for the WAL and the remaining disk for the tempspace? That could work too. But I like having a hot spare in case something dies. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general