Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 32AD7B5DC20 for ; Fri, 28 Oct 2011 15:26:31 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 79684-01 for ; Fri, 28 Oct 2011 18:26:20 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from elizabeth.gransy.com (ns2.gransy.com [89.187.132.100]) by mail.postgresql.org (Postfix) with ESMTP id CB703B5DC26 for ; Fri, 28 Oct 2011 15:26:20 -0300 (ADT) Received: from sq.gransy.com (localhost [127.0.0.1]) by elizabeth.gransy.com (Postfix) with ESMTP id E68C715E4124; Fri, 28 Oct 2011 20:26:19 +0200 (CEST) Received: from 78.45.133.255 (SquirrelMail authenticated user tv@fuzzy.cz) by sq.gransy.com with HTTP; Fri, 28 Oct 2011 20:26:19 +0200 Message-ID: <70afb7c488aca8f564f4b569f857747b.squirrel@sq.gransy.com> In-Reply-To: References: <4EAACA17.7010503@engene.se> Date: Fri, 28 Oct 2011 20:26:19 +0200 Subject: Re: WAL in RAM From: "Tomas Vondra" To: "Merlin Moncure" Cc: "Marcus Engene" , pgsql-performance@postgresql.org User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201110/259 X-Sequence-Number: 45481 On 28 Říjen 2011, 18:11, Merlin Moncure wrote: > On Fri, Oct 28, 2011 at 10:28 AM, Marcus Engene wrote: >> Hi list, >> >> Every now and then I have write peaks which causes annoying delay on my >> website. No particular reason it seems, just that laws of probability >> dictates that there will be peaks every now and then. >> >> Anyway, thinking of ways to make the peaks more bareable, I saw the new >> 9.1 >> feature to bypass WAL. Problems is mainly that some statistics tables >> ("x >> users clicked this link this month") clog the write cache, not more >> important writes. I could live with restoring a nightly dump of these >> tables >> and loose a days worth of logs. >> >> Though not keen on jumping over to early major versions an old idea of >> putting WAL in RAM came back. Not RAM in main memory but some thingie >> pretending to be a drive with proper battery backup. >> >> a) It seems to exist odd hardware with RAM modules and if lucky also >> battery >> b) Some drive manufactureres have done hybird ram-spindle drives >> (compare >> with possibly more common ssd-spindle hybrides). >> >> b) sounds slightly more appealing since it basically means I put >> everything >> on those drives and it magically is faster. The a) alternatives also >> seemed >> to be non ECC which is a no-no and disturbing. >> >> Does anyone here have any recommendations here? >> >> Pricing is not very important but reliability is. > > Have you ruled out SSD? They are a little new, but I'd be looking at > the Intel 710. In every case I've seen SSD permanently ends I/O > issues. DRAM storage solutions I find to be pricey and complicated > when there are so many workable flash options out now. Are you sure SSDs are a reasonable option for WAL? I personally don't think it's a good option, because WAL is written in a sequential manner, and that's not an area where SSDs beat spinners really badly. For example the Intel 710 SSD has a sequential write speed of 210MB/s, while a simple SATA 7.2k drive can write about 50-100 MB/s for less than 1/10 of the 710 price. I'm not saying SSDs are a bad thing, but I think it's a waste of money to use them for WAL. Tomas