Re: "out of memory" error

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: "out of memory" error
Дата
Msg-id 20070823184606.GC27764@svana.org
обсуждение исходный текст
Ответ на Re: "out of memory" error  (Christian Schröder <cs@deriva.de>)
Ответы Re: "out of memory" error
Re: "out of memory" error
Список pgsql-general
On Thu, Aug 23, 2007 at 08:30:46PM +0200, Christian Schröder wrote:
>    Thanks for your tips! I have changed the "shared_buffers" setting back
>    to 2 GB. It was set to 2 GB before, but we also had "out of memory"
>    errors with this setting, so I raised it to 3 GB.

You've got it completely wrong. By setting shared_buffers to 2GB it
means no-one can use it. It's not postgres that's running out of
memory, it's the rest of your system. Set it to something sane like
128MB or maybe smaller.

It's a cache, nothing more, small values does not mean you can't run big
queries.

The rest of Tom's comment was about how large shared_buffer is worse
because it eats away at your real disk cache and your performance will
completely tank.

Have a nice day,

>    Doesn't that mean that plenty of memory is unused? I always thought
>    that the memory used for buffers and caches can be thought of as free
>    memory. Isn't this correct?

Postgresql shared_buffers is not "free". It should be around your
actually working set size, much bigger is counter productive.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: PostgreSQL vs Firebird feature comparison finished
Следующее
От: Bill Moran
Дата:
Сообщение: Re: Apache + PHP + Postgres Interaction