Re: Thinking about breaking up the BufMgrLock - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Thinking about breaking up the BufMgrLock
Date
Msg-id 27183.1107791240@sss.pgh.pa.us
Whole thread Raw
In response to Re: Thinking about breaking up the BufMgrLock  ("Simon Riggs" <simon@2ndquadrant.com>)
Responses Re: Thinking about breaking up the BufMgrLock  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-hackers
"Simon Riggs" <simon@2ndquadrant.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Query optimizer 8.0.1 (and 8.0)
Next
From: Tom Lane
Date:
Subject: Re: Is there a way to make VACUUM run completely outside transaction