Thread: choosing the right RAID level for PostgresQL database

choosing the right RAID level for PostgresQL database

From
sergey
Date:
Hello,

I got a disk array appliance of 8 disks 1T each (UltraStor RS8IP4). It will be used solely by PostgresQL database and I am trying to choose the best RAID level for it.

The most priority is for read performance since we operate large data sets (tables, indexes) and we do lots of searches/scans, joins and nested queries. With the old disks that we have now the most slowdowns happen on SELECTs.

Fault tolerance is less important, it can be 1 or 2 disks.

Space is the least important factor. Even 1T will be enough.

Which RAID level would you recommend in this situation. The current options are 60, 50 and 10, but probably other options can be even better.

Thank you!

Re: choosing the right RAID level for PostgresQL database

From
Scott Marlowe
Date:
On Sun, Feb 13, 2011 at 1:12 PM, sergey <sergey.on.net@gmail.com> wrote:
> Hello,
>
> I got a disk array appliance of 8 disks 1T each (UltraStor RS8IP4). It will
> be used solely by PostgresQL database and I am trying to choose the best
> RAID level for it.
>
> The most priority is for read performance since we operate large data sets
> (tables, indexes) and we do lots of searches/scans, joins and nested
> queries. With the old disks that we have now the most slowdowns happen on
> SELECTs.
>
> Fault tolerance is less important, it can be 1 or 2 disks.
>
> Space is the least important factor. Even 1T will be enough.
>
> Which RAID level would you recommend in this situation. The current options
> are 60, 50 and 10, but probably other options can be even better.

Unless testing shows some other level is better, RAID-10 is usually
the best.  with software RAID-10 and 24 disks I can flood a 4 channel
SAS cable with sequential transfers quite easily, and for random
access it's very good as well, allowing me to reach about 5 to 6k tps
with a large pgbench db (-i -s 4000) ~ 40Gig

Re: choosing the right RAID level for PostgresQL database

From
Scott Marlowe
Date:
On Sun, Feb 13, 2011 at 3:54 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
> On Sun, Feb 13, 2011 at 1:12 PM, sergey <sergey.on.net@gmail.com> wrote:
>> Hello,
>>
>> I got a disk array appliance of 8 disks 1T each (UltraStor RS8IP4). It will
>> be used solely by PostgresQL database and I am trying to choose the best
>> RAID level for it.
>>
>> The most priority is for read performance since we operate large data sets
>> (tables, indexes) and we do lots of searches/scans, joins and nested
>> queries. With the old disks that we have now the most slowdowns happen on
>> SELECTs.
>>
>> Fault tolerance is less important, it can be 1 or 2 disks.
>>
>> Space is the least important factor. Even 1T will be enough.
>>
>> Which RAID level would you recommend in this situation. The current options
>> are 60, 50 and 10, but probably other options can be even better.
>
> Unless testing shows some other level is better, RAID-10 is usually
> the best.  with software RAID-10 and 24 disks I can flood a 4 channel
> SAS cable with sequential transfers quite easily, and for random
> access it's very good as well, allowing me to reach about 5 to 6k tps
> with a large pgbench db (-i -s 4000) ~ 40Gig

Also, keep in mind that even if RAID5,6,50,60 are faster when not
degraded, if they are degraded they will usually be quite a bit slower
than RAID-10 with a missing drive.

Re: choosing the right RAID level for PostgresQL database

From
Greg Smith
Date:
sergey wrote:
> I got a disk array appliance of 8 disks 1T each (UltraStor RS8IP4). It
> will be used solely by PostgresQL database and I am trying to choose
> the best RAID level for it.
> ..
> Space is the least important factor. Even 1T will be enough.

Use RAID10, measure the speed of the whole array using the bonnie++ ZCAV
tool, and only use the fastest part of each array to store the important
stuff.  You will improve worst-case performance in both sequential reads
and seek time that way.  Drives are nearly twice as fast at their
beginning as they are at the end, and with only 8 drives you should be
able to setup a RAID10 array with all the fast parts aligned.

--
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books


Re: choosing the right RAID level for PostgresQL database

From
Dave Crooke
Date:
For any database, anywhere, the answer is pretty much always RAID-10.

The only time you would do anything else is for odd special cases.

Cheers
Dave

On Sun, Feb 13, 2011 at 2:12 PM, sergey <sergey.on.net@gmail.com> wrote:
Hello,

I got a disk array appliance of 8 disks 1T each (UltraStor RS8IP4). It will be used solely by PostgresQL database and I am trying to choose the best RAID level for it.

The most priority is for read performance since we operate large data sets (tables, indexes) and we do lots of searches/scans, joins and nested queries. With the old disks that we have now the most slowdowns happen on SELECTs.

Fault tolerance is less important, it can be 1 or 2 disks.

Space is the least important factor. Even 1T will be enough.

Which RAID level would you recommend in this situation. The current options are 60, 50 and 10, but probably other options can be even better.

Thank you!


Re: choosing the right RAID level for PostgresQL database

From
david@lang.hm
Date:
On Sun, 13 Feb 2011, Dave Crooke wrote:

> For any database, anywhere, the answer is pretty much always RAID-10.
>
> The only time you would do anything else is for odd special cases.

there are two situations where you would opt for something other than
RAID-10

1. if you need the space that raid 6 gives you compared to raid 10 you may
not have much choice

2. if you do almost no updates to the disk during the time you are doing
the reads then raid 6 can be at least as fast as raid 10 in non-degraded
mode (it could be faster if you are able to use faster parts of the disks
in raid 6 than you could in raid 10). degraded mode suffers more, but you
can tolerate any 2 drives failing rather than just any 1 drive failing for
raid 10 (the wrong two drives failing can kill a raid 10, while if the
right drives fail you can loose a lot more drives in raid 10)

where raid 6 is significantly slower than raid 10 is when you are doing
small random writes. Also many the performance variation between raid
controllers will be much higher with raid 6 than with raid 10

David Lang

> Cheers
> Dave
>
> On Sun, Feb 13, 2011 at 2:12 PM, sergey <sergey.on.net@gmail.com> wrote:
>
>> Hello,
>>
>> I got a disk array appliance of 8 disks 1T each (UltraStor RS8IP4). It will
>> be used solely by PostgresQL database and I am trying to choose the best
>> RAID level for it.
>>
>> The most priority is for read performance since we operate large data sets
>> (tables, indexes) and we do lots of searches/scans, joins and nested
>> queries. With the old disks that we have now the most slowdowns happen on
>> SELECTs.
>>
>> Fault tolerance is less important, it can be 1 or 2 disks.
>>
>> Space is the least important factor. Even 1T will be enough.
>>
>> Which RAID level would you recommend in this situation. The current options
>> are 60, 50 and 10, but probably other options can be even better.
>>
>> Thank you!
>>
>>
>