Re: Warm-up cache may have its virtue

From: Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Warm-up cache may have its virtue
Date: 2006-01-06 03:50:37
Message-ID: Pine.LNX.4.58.0601052237500.15540@josh.db
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 5 Jan 2006, Qingqing Zhou wrote:
>
> Feasibility: Our bufmgr lock rewrite already makes this possible. But to
> enable it, we may need more work: (w1) make bufferpool relation-wise,
> which makes our estimation of data page residence more easy and reliable.
> (w2) add aggresive pre-read on buffer pool level. Also, another benefit of
> w1 will make our query planner can estimate query cost more precisely.
>

"w1" is doable by introducing a shared-memory bitmap indicating which
pages of a relation are in buffer pool (We may want to add a hash to
manage the relations). Theoretically, O(shared_buffer) bits are enough. So
this will not use a lot of space.

When we maintain the SharedBufHash, we maintain this bitmap. When we do
query cost estimation or preread, we just need a rough number, so this can
be done by scanning the bitmap without lock. Thus there is also almost no
extra cost.

Regards,
Qingqing

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruno Wolff III 2006-01-06 04:56:49 Re: [HACKERS] Inconsistent syntax in GRANT
Previous Message Tom Lane 2006-01-06 02:13:57 Re: catalog corruption bug