Re: memory requirements question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: memory requirements question
Дата
Msg-id 3729.935526964@sss.pgh.pa.us
обсуждение исходный текст
Список pgsql-hackers
Adam Ulmer <ulmer@soulgamer.com> writes:
>> can anyone tell me where I need to look so that I can calculate the
>> amount of shmem req'd by postmaster and N backends?

Easiest way is to try it and see ;-).  AFAIR the space allocated per
backend is miniscule compared to the space per disk buffer, so you could
use "8K per buffer plus some constant" as a good first approximation.
If you want to know what the delta per backend is, then try a few
different -N values with fixed -B and look at what ipcs says...

> different invocations of postmaster with -N options set at 16, 32, and
> 1024 (which I gather means -B options of 32, 64, and 2048).

We require a *minimum* of 2 buffers per backend --- if you have too
few buffers then you'd lose performance due to contention for buffers.
More is probably a good idea.  The ideal function is probably some fixed
number like a few dozen (to cache the system tables) plus X per backend,
where I suspect X should be more like 5 to 10.  But I don't know that
anyone has really tried to measure what a good choice is for -B versus
-N.  I've cc'd this to pghackers in case anyone there has results to
share.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] vacuum process size
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] vacuum process size