Re: sort_mem sizing (Non-linear Performance)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: sort_mem sizing (Non-linear Performance)
Дата
Msg-id 18012.1022856428@sss.pgh.pa.us
обсуждение исходный текст
Ответ на sort_mem sizing (Non-linear Performance)  (Curt Sampson <cjs@cynic.net>)
Ответы Re: sort_mem sizing (Non-linear Performance)  (Curt Sampson <cjs@cynic.net>)
Список pgsql-general
Curt Sampson <cjs@cynic.net> writes:
> Next I tried to bump the sortmem up to 256 MB, half the physical RAM
> of the machine. I found out the hard way that the back-end doing the
> indexing will grow to something over three times the size of sortmem,
> and proceeded (slowly) to extricate myself from swap hell.

[ scratches head ... ]  The sort code tries very hard to keep track
of how much it's storing.  I wonder why it's so far off?  Perhaps
failing to allow for palloc overhead?  Remind me again of the exact
datatype you were indexing, please.

> But I decided I couldn't spare that much memory for a database doing
> real work, too, and backed down to 32 MB. That got the process down to
> 115 MB (100 MB resident), but oddly enough sped it up even more, shaving
> the sort time by more than 35% from the original.

Looks like the 128Mb case was swapping a lot (note the page faults
count).  That probably explains the difference.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Non-linear Performance
Следующее
От: Doug Fields
Дата:
Сообщение: Re: Non-linear Performance