Re: PostgreSQL as a local in-memory cache

From: "Pierre C" <lists(at)peufeu(dot)com>
To: "Josh Berkus" <josh(at)agliodbs(dot)com>, "postgres performance list" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: PostgreSQL as a local in-memory cache
Date: 2010-06-17 18:44:04
Message-ID: op.vegjnqfreorkce@apollo13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


> 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Dimitri Fontaine 2010-06-17 19:01:19 Re: PostgreSQL as a local in-memory cache
Previous Message Josh Berkus 2010-06-17 17:29:37 Re: PostgreSQL as a local in-memory cache