Re: "out of memory" error

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: "out of memory" error
Дата
Msg-id 20070824093513.GA29688@svana.org
обсуждение исходный текст
Ответ на Re: "out of memory" error  ("Mikko Partio" <mpartio@gmail.com>)
Список pgsql-general
On Fri, Aug 24, 2007 at 12:07:37PM +0300, Mikko Partio wrote:
> On 8/23/07, Martijn van Oosterhout <kleptog@svana.org> wrote:
> > 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.
> Isn't 128MB quite low considering the "current standard" of 25% - 50% of
> total ram?

Not sure about "current standard" but it depends heavily on your
system. On my laptop where postgres is among the least important
applications, even 16MB might be too much. If you have a server
dedicated to it, maybe a larger percentage would be helpful, but >50%
of memory is definitly counterproductive.

The basic issue is that everything postgres reads into shared_buffers
is going to be in the system-wide disk cache also. That's two copies of
everything -> wasted memory. I think it's probably more to do with your
write-traffic than read-traffic.

At the very least, if you're reaching the point where the kernel is
swapping shared memory to disk, you've lost. More is most definitly not
always better.

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 по дате отправления:

Предыдущее
От: "andrew quaresma"
Дата:
Сообщение: cant get spatial data..
Следующее
От: Christian Schröder
Дата:
Сообщение: Re: "out of memory" error