Josh Berkus <josh@agliodbs.com> writes:
>> We are running with shared buffers large enough to hold the
>> entire database
> Which is bad. This is not what shared buffers are for. See:
> http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html
In fact, that may be the cause of the performance issue. The high
context-swap rate suggests heavy contention for shared-memory data
structures. The first explanation that occurs to me is that too much
time is being spent managing the buffer hashtable, causing that to
become a serialization bottleneck. Try setting shared_buffers to 10000
or so and see if it gets better.
regards, tom lane