Re: Adding more memory = hugh cpu load

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: Adding more memory = hugh cpu load
Дата
Msg-id 4E931846.80509@2ndQuadrant.com
обсуждение исходный текст
Ответ на Re: Adding more memory = hugh cpu load  (Shaun Thomas <sthomas@peak6.com>)
Список pgsql-performance
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@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us


В списке pgsql-performance по дате отправления:

Предыдущее
От: Shaun Thomas
Дата:
Сообщение: Re: Adding more memory = hugh cpu load
Следующее
От: Leonardo Francalanci
Дата:
Сообщение: Re: Adding more memory = hugh cpu load