Re: Multiple buffer cache?

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alexei Vladishev <alexei(dot)vladishev(at)zabbix(dot)com>, pgsql-general(at)postgresql(dot)org, Greg Smith <greg(at)2ndquadrant(dot)com>
Subject: Re: Multiple buffer cache?
Date: 2010-02-08 14:42:34
Message-ID: 20100208144234.GC4113@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Davor J. 2010-02-08 14:55:54 One column to multiple columns based on constraints?
Previous Message Marc Lustig 2010-02-08 13:55:08 error migrating database from 8.4 to 8.3