pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
choosing the right RAID level for PostgresQL database
6+ messages / 5 participants
[nested] [flat]

* choosing the right RAID level for PostgresQL database
@ 2011-02-13 20:12  sergey <sergey.on.net@gmail.com>
  0 siblings, 3 replies; 6+ messages in thread

From: sergey @ 2011-02-13 20:12 UTC (permalink / raw)
  To: pgsql-performance

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!

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: choosing the right RAID level for PostgresQL database
@ 2011-02-13 22:54  Scott Marlowe <scott.marlowe@gmail.com>
  parent: sergey <sergey.on.net@gmail.com>
  2 siblings, 1 reply; 6+ messages in thread

From: Scott Marlowe @ 2011-02-13 22:54 UTC (permalink / raw)
  To: sergey <sergey.on.net@gmail.com>; +Cc: pgsql-performance

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: choosing the right RAID level for PostgresQL database
@ 2011-02-13 22:59  Scott Marlowe <scott.marlowe@gmail.com>
  parent: Scott Marlowe <scott.marlowe@gmail.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Scott Marlowe @ 2011-02-13 22:59 UTC (permalink / raw)
  To: sergey <sergey.on.net@gmail.com>; +Cc: pgsql-performance

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.



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: choosing the right RAID level for PostgresQL database
@ 2011-02-13 23:23  Greg Smith <greg@2ndquadrant.com>
  parent: sergey <sergey.on.net@gmail.com>
  2 siblings, 0 replies; 6+ messages in thread

From: Greg Smith @ 2011-02-13 23:23 UTC (permalink / raw)
  To: sergey <sergey.on.net@gmail.com>; +Cc: pgsql-performance

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




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: choosing the right RAID level for PostgresQL database
@ 2011-02-14 01:54  Dave Crooke <dcrooke@gmail.com>
  parent: sergey <sergey.on.net@gmail.com>
  2 siblings, 1 reply; 6+ messages in thread

From: Dave Crooke @ 2011-02-14 01:54 UTC (permalink / raw)
  To: sergey <sergey.on.net@gmail.com>; +Cc: pgsql-performance

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!
>
>

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: choosing the right RAID level for PostgresQL database
@ 2011-02-14 08:02  david@lang.hm
  parent: Dave Crooke <dcrooke@gmail.com>
  0 siblings, 0 replies; 6+ messages in thread

From: david@lang.hm @ 2011-02-14 08:02 UTC (permalink / raw)
  To: Dave Crooke <dcrooke@gmail.com>; +Cc: sergey <sergey.on.net@gmail.com>; pgsql-performance

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!
>>
>>
>



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2011-02-14 08:02 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-02-13 20:12 choosing the right RAID level for PostgresQL database sergey <sergey.on.net@gmail.com>
2011-02-13 22:54 ` Scott Marlowe <scott.marlowe@gmail.com>
2011-02-13 22:59   ` Scott Marlowe <scott.marlowe@gmail.com>
2011-02-13 23:23 ` Greg Smith <greg@2ndquadrant.com>
2011-02-14 01:54 ` Dave Crooke <dcrooke@gmail.com>
2011-02-14 08:02   ` david@lang.hm

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox