Bruce Momjian <pgman@candle.pha.pa.us> writes:
> And ARC has locking requirements that will make it very hard to fix our
> SMP buffer management problems in 8.1.
I am working on a buffer manager rewrite using the BufMgrLock breakup
and "clock sweep" management algorithm we've been discussing. At the
moment it's passing the regression tests but I'm sure there's some bugs
left :-(. I just now tried it on the infamous context-swap-storm test
case using a 4-way machine at Red Hat. PG 8.0 shows 20K or more CS/sec
and under 30% CPU usage in this situation. The patch shows 99% CPU
utilization and about 200 CS/sec (which is about nil, because the
machine shows ~100 CS/sec with nothing running except vmstat).
Still to be determined: what we lose in extra I/O from the presumably
less efficient cache management; also what sort of slowdown occurs on
a single-CPU machine that isn't going to get any benefit from the
increased amount of lock management. But it looks promising.
regards, tom lane