Re: Infinite Cache

From: Greg Smith <greg(at)2ndQuadrant(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Infinite Cache
Date: 2011-07-01 15:54:09
Message-ID: 4E0DEDA1.3090806@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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(at)2ndQuadrant(dot)com Baltimore, MD
Comprehensive and Customized PostgreSQL Training Classes:
http://www.2ndquadrant.us/postgresql-training/

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jim Nasby 2011-07-01 22:37:51 Re: Infinite Cache
Previous Message Anthony Presley 2011-07-01 14:43:39 Infinite Cache