pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Smith <greg@2ndQuadrant.com>
To: pgsql-performance@postgresql.org
Subject: Re: Infinite Cache
Date: Fri, 01 Jul 2011 11:54:09 -0400
Message-ID: <4E0DEDA1.3090806@2ndQuadrant.com> (raw)
In-Reply-To: <BANLkTi=BWd5G_q2erCZK-Htd=CLU1n9R0Q@mail.gmail.com>
References: <BANLkTi=BWd5G_q2erCZK-Htd=CLU1n9R0Q@mail.gmail.com>

On 07/01/2011 10:43 AM, Anthony Presley wrote:
> Was curious if there was some sort of Open Source version of Infinite 
> Cache, and/or a memcache layer that can be "dropped" in front of 
> PostgreSQL without application changes (which seems to be the "key" 
> piece of Infinite Cache), or is this something that EnterpriseDB owns 
> and you have to buy their version of the software to use? 

The best solution available for this class of problem is pgmemcache:  
http://pgfoundry.org/projects/pgmemcache/

There's not too much documentation about it around, but you'll find an 
intro talk at http://projects.2ndquadrant.com/char10 I found helpful 
when Hannu presented it.  It does take some work to utilize, including 
application code changes.  The hardest part of which is usually making 
sure the key hashing scheme it uses to identify re-usable queries is 
useful to you.  And that isn't always the case.

This approach scales better than "Infinite Cache" because you can move 
the whole mess onto another server optimized to be a caching system.  
Those systems have a very different set of trade-offs and 
correspondingly economics than a database server must have.  The cache 
system can be a cheap box with a bunch of RAM, that's it.  And the read 
traffic it avoids passing to the server really doesn't touch the 
database at all, which is way better than going to the database but 
being serviced quickly.

Everyone would prefer performance improvements that don't involve any 
modification of their application.  The unfortunate reality of database 
design is that any server tuning can only provide a modest gain; if you 
make things twice as fast you've done a great job.  Whereas when doing 
application redesign for better performance, I aim for a 10X speedup and 
often do much better than that.

-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
Comprehensive and Customized PostgreSQL Training Classes:
http://www.2ndquadrant.us/postgresql-training/




view thread (9+ messages)  latest in thread

Message-ID: <4E0DEDA1.3090806@2ndQuadrant.com>
Permalink:  ../4E0DEDA1.3090806@2ndQuadrant.com/
Also on:    postgresql.org/message-id/4E0DEDA1.3090806@2ndQuadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: greg@2ndQuadrant.com
  Subject: Re: Infinite Cache
  In-Reply-To: <4E0DEDA1.3090806@2ndQuadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox