Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id DD4016332D6 for ; Thu, 17 Jun 2010 15:45:32 -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 14659-03 for ; Thu, 17 Jun 2010 18:45:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from 26.mail-out.ovh.net (26.mail-out.ovh.net [91.121.27.225]) by mail.postgresql.org (Postfix) with SMTP id 62B416336E5 for ; Thu, 17 Jun 2010 15:45:24 -0300 (ADT) Received: (qmail 5303 invoked by uid 503); 17 Jun 2010 18:51:57 -0000 Received: from b7.ovh.net (HELO mail407.ha.ovh.net) (213.186.33.57) by 26.mail-out.ovh.net with SMTP; 17 Jun 2010 18:51:57 -0000 Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 17 Jun 2010 20:45:23 +0200 Received: from par69-8-88-161-102-87.fbx.proxad.net (HELO apollo13) (lists%peufeu.com@88.161.102.87) by ns0.ovh.net with SMTP; 17 Jun 2010 20:45:22 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Josh Berkus" , "postgres performance list" Subject: Re: PostgreSQL as a local in-memory cache References: <18287446-8677-46d6-a581-c4777f60ebda@40g2000pry.googlegroups.com> <4C1A5B81.8050908@agliodbs.com> Date: Thu, 17 Jun 2010 20:44:04 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Pierre C" Message-ID: In-Reply-To: <4C1A5B81.8050908@agliodbs.com> User-Agent: Opera Mail/10.10 (Linux) X-Ovh-Tracer-Id: 7872855099058161255 X-Ovh-Remote: 88.161.102.87 (par69-8-88-161-102-87.fbx.proxad.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|U 0.5/N X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-10 required=5 tests=BAYES_50=0.8 X-Spam-Level: X-Archive-Number: 201006/313 X-Sequence-Number: 39169 > Especially as, in repeated tests, PostgreSQL with persistence turned off > is just as fast as the fastest nondurable NoSQL database. And it has a > LOT more features. An option to completely disable WAL for such use cases would make it a lot faster, especially in the case of heavy concurrent writes. > Now, while fsync=off and tmpfs for WAL more-or-less eliminate the IO for > durability, they don't eliminate the CPU time. Actually the WAL overhead is some CPU and lots of locking. > Which means that a caching version of PostgreSQL could be even faster. > To do that, we'd need to: > > a) Eliminate WAL logging entirely > b) Eliminate checkpointing > c) Turn off the background writer > d) Have PostgreSQL refuse to restart after a crash and instead call an > exteral script (for reprovisioning) > > Of the three above, (a) is the most difficult codewise. Actually, it's pretty easy, look in xlog.c