Re: Thinking about breaking up the BufMgrLock

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, neilc(at)samurai(dot)com
Subject: Re: Thinking about breaking up the BufMgrLock
Date: 2005-02-07 15:47:20
Message-ID: 27183.1107791240@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> After much thought, I believe the best way is to implement bufferpools
> (BPs). That is, we don't just have one bufferhash and one LRU, we have
> many pairs. We then work out some mapping by which a block can be known
> to be in a particular BP, then acquire the lock for that BP.

I think this is basically wrongheaded, because it achieves its reduction
in contention by a one-for-one sacrifice of cache allocation efficiency;
that is, any individual page is now fighting for survival in a pool only
1/Nth as large as before. We're going to lose more in I/O than we can
hope to save at the processor level.

I think a clock algorithm or something similar may be a reasonable way
to go, though.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-02-07 15:51:14 Re: Is there a way to make VACUUM run completely outside transaction
Previous Message Tom Lane 2005-02-07 15:32:10 Re: Query optimizer 8.0.1 (and 8.0)