From: | Greg Smith <greg(at)2ndquadrant(dot)com> |
---|---|
To: | "Bret S(dot) Lambert" <bret(dot)lambert(at)gmail(dot)com> |
Cc: | C?dric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com>, Alexei Vladishev <alexei(dot)vladishev(at)zabbix(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Multiple buffer cache? |
Date: | 2010-02-06 23:28:31 |
Message-ID: | 4B6DFB1F.90807@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Bret S. Lambert wrote:
> On Sat, Feb 06, 2010 at 02:44:32PM +0100, C?dric Villemain wrote:
>
>> I am working on pgfincore which allow in some way to prepare buffer cache.
>> You need pg > 8.4 and linux (probably working with bsd too)
>>
>
> Why do something with a non-portable interface? Most OSes support
> coherently mmap(2)'ing disk blocks into memory; in fact, I'm somewhat
> taken aback that the postgres buffer cache isn't implemented in that
> manner, but I'm willing to give the devs credit for having not done
> so for good reasons.
>
First off, Cedric's work is using a fairly portable interface: mincore
http://www.kernel.org/doc/man-pages/online/pages/man2/mincore.2.html
combined with clever bits of mmap. Two useful introductions to this are
are http://www.usenix.org/events/lisa07/tech/plonka.html and
http://www.kennygorman.com/wordpress/?p=246
As for why not use mmap in the first place, this is a long running
debate. See
http://wiki.postgresql.org/wiki/Todo#Miscellaneous_Performance for a
quick intro to the issues involved. There are portability, database
consistency, and code complexity issues around such a change, and the
practical benefit of the change is not so obvious as to make hurdling
those seem a priority. Plenty of easier changes around with completely
unambiguous benefits to work on instead.
--
Greg Smith 2ndQuadrant Baltimore, MD
PostgreSQL Training, Services and Support
greg(at)2ndQuadrant(dot)com www.2ndQuadrant.com
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Mead | 2010-02-07 03:07:16 | Re: Snow Leopard-how to get PG 8.4 to start up on demand? |
Previous Message | Greg Smith | 2010-02-06 23:14:50 | Re: Multiple buffer cache? |