Re: Memory Usage and OpenBSD

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Memory Usage and OpenBSD
Дата
Msg-id 16336.1265815496@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Memory Usage and OpenBSD  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Memory Usage and OpenBSD  (Jeff Ross <jross@wykids.org>)
Список pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> On Tue, Feb 09, 2010 at 08:19:51PM +0500, Anton Maksimenkov wrote:
>> Can anybody briefly explain me how one postgres process allocate
>> memory for it needs?

> There's no real maximum, as it depends on the exact usage. However, in
> general postgres tries to keep below the values in work_mem and
> maintainence_workmem. Most of the allocations are quite small, but
> postgresql has an internal allocator which means that the system only
> sees relatively large allocations. The majority will be in the order of
> tens of kilobytes I suspect.

IIRC, the complaint that started this thread was about a VACUUM command
failing.  Plain VACUUM will in fact start out by trying to acquire a
single chunk of size maintenance_work_mem.  (On a small table it might
not be so greedy, but on a large table it will do that.)  So you
probably shouldn't ever try to set that value as large as 1GB if you're
working in a 32-bit address space.  You could maybe do it if you've kept
shared_buffers small, but that seems like the wrong performance tradeoff
in most cases ...

            regards, tom lane

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Best way to handle multi-billion row read-only table?
Следующее
От: "Ing. Marcos L. Ortiz Valmaseda"
Дата:
Сообщение: Re: [PERFORM] PostgreSQL - case studies