Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h7gsZ-0007i0-Nv for pgsql-general@arkaria.postgresql.org; Sat, 23 Mar 2019 13:40:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h7gsW-00062w-QA for pgsql-general@arkaria.postgresql.org; Sat, 23 Mar 2019 13:40:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h7gsW-00062p-EJ for pgsql-general@lists.postgresql.org; Sat, 23 Mar 2019 13:40:04 +0000 Received: from squeakycode.net ([96.126.114.205]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h7gsP-0004iv-P3 for pgsql-general@lists.postgresql.org; Sat, 23 Mar 2019 13:40:03 +0000 Received: from rogue.localdomain (209-252-173-154.cgn.imoncommunications.net [209.252.173.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: andy) by squeakycode.net (Postfix) with ESMTPSA id B7B5422815; Sat, 23 Mar 2019 08:39:56 -0500 (CDT) Subject: Re: software or hardware RAID? To: Rory Campbell-Lange , pgsql-general@lists.postgresql.org References: <20190317225346.u6oogxabsqfhyfw3@campbell-lange.net> <20190323120911.s7vq67yv3iw4rllf@campbell-lange.net> From: Andy Colson Message-ID: <236a4f02-bdda-cd47-c05e-6c314bc45007@squeakycode.net> Date: Sat, 23 Mar 2019 08:39:55 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190323120911.s7vq67yv3iw4rllf@campbell-lange.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 3/23/19 7:09 AM, Rory Campbell-Lange wrote: > On 17/03/19, Rory Campbell-Lange (rory@campbell-lange.net) wrote: >> We aren't sure whether to use software MDRaid or a MegaRAID card. >> >> We're buying some new Postgres servers with >> >> 2 x 240GB Intel SSD S4610 (RAID1 : system) >> 4 x 960GB Intel SSD S4610 (RAID10 : db) >> >> We'll be using Postgres 11 on Debian. >> >> The MegaRAID 9271-8i with flash cache protection is available from our >> provider. I think they may also have the 9361-8i which is 12Gb/s. >> >> Our current servers which use the LSI 9261 with SSDs and we don't see >> any IO significant load as we are in RAM most of the time and the RAID >> card seems to flatten out any IO spikes. >> >> We use MDRaid elsewhere but we've never used it for our databases >> before. > > Apologies for re-heating this email from last week. I could really do with the > advice. > > Has anyone got any general comments on whether software RAID or an LSI card > is preferable? > > We will be replicating load on an existing server, which has an LSI 9261 card. > Below is some stats from sar showing a "heavy" period of load on vdisk sda > > 00:00:01 DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util > 14:15:01 sda 112.82 643.09 14986.24 138.53 2.09 18.50 0.25 2.86 > 14:25:01 sda 108.52 270.17 15682.94 147.01 1.87 17.22 0.25 2.73 > 14:35:01 sda 107.96 178.25 14868.52 139.37 1.70 15.73 0.23 2.53 > 14:45:01 sda 150.97 748.94 16919.69 117.03 1.83 12.11 0.22 3.28 > > Thanks for any advice. > > Rory > I have run both software and hardware (though different than the card you listed), and had good success with both. In cases where I had little money, just drop 6 drives into a md raid 10, and run happy for years and years. I run production PG 11 on software raid 10 as we speek. I personally prefer software raid, for a few reasons: 1) you'll probably be running on a batter backup anyway, so missing raid card battery isn't that much 2) 100% compatible with any other hardware you wanna run. Sucky thing about hardware card is your on that one forever. 3) tooling is much better and simpler. I really hate the crappy bios raid screen. I never know if adding an HD to an exiting raid will wipe it or maintain it. 4) I setup smartctl to watch and report on drives. Even a 50% chance it detects before failure is a net benefit. You cant always to that through hardware raid You can always start with software raid, see how it runs for a while, then buy hardware raid if its not working out. -Andy