On 10/10/2011 10:04 AM, Shaun Thomas wrote:
The problem with having lots of memory is... that you have lots of memory. The operating system likes to cache, and this includes writes. Normally this isn't a problem, but with 48GB of RAM, the defaults (for CentOS 5.5 in particular) are to use up to 40% of that to cache writes.
I make the same sort of tuning changes Shaun suggested on every CentOS 5 system I come across. That said, you should turn on log_checkpoints in your postgresql.conf and see whether the "sync=" numbers are high. That will help prove or disprove that the slowdown you're seeing is from too much write caching. You also may be able to improve that by adjusting checkpoint_segments/checkpoint_timeout, or *decreasing* shared_buffers. More about this at http://www.westnet.com/~gsmith/content/postgresql/chkp-bgw-83.htm
There are some other possibilities, too, like that memory addition can actually causing average memory speed to drop as Kevin mentioned. I always benchmark with stream-scaling: https://github.com/gregs1104/stream-scaling before and after a RAM size change, to see whether things are still as fast or not. It's hard to do that in the position you're in now though.
-- Greg Smith 2ndQuadrant US greg@xxxxxxxxxxxxxxx Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance