Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 319092E0337 for ; Wed, 26 Dec 2007 12:26:42 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 84019-04 for ; Wed, 26 Dec 2007 12:26:34 -0400 (AST) Received: from ironport2-out.pppoe.ca (ironport2-out.pppoe.ca [206.248.154.182]) by postgresql.org (Postfix) with ESMTP id BA9D92E033E for ; Wed, 26 Dec 2007 12:26:34 -0400 (AST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAOMPckfO+Igp/2dsb2JhbACCb6ZU X-IronPort-AV: E=Sophos;i="4.24,208,1196658000"; d="scan'208,217";a="11979816" Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 26 Dec 2007 11:26:32 -0500 Received: from [206.248.136.41] ([206.248.136.41]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id FCA39832; Wed, 26 Dec 2007 11:26:32 -0500 Message-ID: <47728000.4000709@mark.mielke.cc> Date: Wed, 26 Dec 2007 11:23:28 -0500 From: Mark Mielke User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Fernando Hevia CC: 'pgsql-performance' Subject: Re: With 4 disks should I go for RAID 5 or RAID 10 References: <0ea101c847d2$16f94bc0$8f01010a@iptel.com.ar> In-Reply-To: <0ea101c847d2$16f94bc0$8f01010a@iptel.com.ar> Content-Type: multipart/alternative; boundary="------------020407020400030204000305" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/360 X-Sequence-Number: 28176 This is a multi-part message in MIME format. --------------020407020400030204000305 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Fernando Hevia wrote: > > Database will be about 30 GB in size initially and growing 10 GB per > year. Data is inserted overnight in two big tables and during the day > mostly read-only queries are run. Parallelism is rare. > > I have read about different raid levels with Postgres but the advice > found seems to apply on 8+ disks systems. With only four disks and > performance in mind should I build a RAID 10 or RAID 5 array? Raid 0 > is overruled since redundancy is needed. > > I am going to use software Raid with Linux (Ubuntu Server 6.06). > In my experience, software RAID 5 is horrible. Write performance can decrease below the speed of one disk on its own, and read performance will not be significantly more than RAID 1+0 as the number of stripes has only increased from 2 to 3, and if reading while writing, you will not get 3X as RAID 5 write requires at least two disks to be involved. I believe hardware RAID 5 is also horrible, but since the hardware hides it from the application, a hardware RAID 5 user might not care. Software RAID 1+0 works fine on Linux with 4 disks. This is the setup I use for my personal server. Cheers, mark -- Mark Mielke --------------020407020400030204000305 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Fernando Hevia wrote:
With 4 disks should I go for RAID 5 or RAID 10

Database will be about 30 GB in size initially and growing 10 GB per year. Data is inserted overnight in two big tables and during the day mostly read-only queries are run. Parallelism is rare.

I have read about different raid levels with Postgres but the advice found seems to apply on 8+ disks systems. With only four disks and performance in mind should I build a RAID 10 or RAID 5 array? Raid 0 is overruled since redundancy is needed.

I am going to use software Raid with Linux (Ubuntu Server 6.06).


In my experience, software RAID 5 is horrible. Write performance can decrease below the speed of one disk on its own, and read performance will not be significantly more than RAID 1+0 as the number of stripes has only increased from 2 to 3, and if reading while writing, you will not get 3X as RAID 5 write requires at least two disks to be involved. I believe hardware RAID 5 is also horrible, but since the hardware hides it from the application, a hardware RAID 5 user might not care.

Software RAID 1+0 works fine on Linux with 4 disks. This is the setup I use for my personal server.

Cheers,
mark

-- 
Mark Mielke <mark@mielke.cc>
--------------020407020400030204000305--