Re: Multiple buffer cache? - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Multiple buffer cache?
Date
Msg-id 20100208144234.GC4113@alvh.no-ip.org
Whole thread Raw
In response to Re: Multiple buffer cache?  (Greg Stark <stark@mit.edu>)
Responses Re: Multiple buffer cache?  (Greg Smith <greg@2ndquadrant.com>)
List pgsql-general
Greg Stark wrote:
> I doubt pinning buffers ever improve system on any halfway modern system. It
> will often *look* like it has improved performance because it improves the
> performance of the queries you're looking at -- but at the expense of
> slowing down everything else.
>
> There is a use case it would be useful for though. When you have some
> queries that are latency critical. Then you might want to pin the buffers
> those queries use to avoid having larger less urgent queries purge those
> buffers.
>
> If we had a way to mark latency critical queries that might be a more
> flexible interface but ewe would need some way to control just how critical
> they are. we wouldn't want to keep those buffets pinned forever.

This should be easy to test, no?  Just set some variable while running
latency-critical queries that makes PinBuffer increment usage_count by
more than one when pinning a buffer.  Such a buffer would have its usage
count typically higher than a buffer only used for regular queries.

To make this work we'd probably need a slightly larger value of
BM_MAX_USAGE_COUNT, I think.


--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-general by date:

Previous
From: Filip Rembiałkowski
Date:
Subject: Re:
Next
From: Alvaro Herrera
Date:
Subject: Re: weird bug in rebuilding RPMs