Re: [PERFORMANCE] work_mem vs temp files issue

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PERFORMANCE] work_mem vs temp files issue
Дата
Msg-id 25315.1252881420@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PERFORMANCE] work_mem vs temp files issue  (decibel <decibel@decibel.org>)
Ответы Re: [PERFORMANCE] work_mem vs temp files issue
Список pgsql-performance
decibel <decibel@decibel.org> writes:
> On Aug 19, 2009, at 7:45 PM, Jaime Casanova wrote:
>> AFAIUI, work_mem is used for some operations (sort, hash, etc) for
>> avoiding the use of temp files on disk...
>>
>> In a client server i'm monitoring (pg 8.3.7, 32GB of ram) work_mem is
>> set to 8MB, however i'm seeing a lot of temp files (>30000 in 4 hours)
>> with small sizes (ie: 2021520 obviously lower than 8MB). so, why?
>> maybe we use work_mem until we find isn't enough and we send just the
>> difference to a temp file?
>>
>> i'm not thinking in raising work_mem until i understand this well,
>> what's the point if we still create temp files that could fit in
>> work_mem...

> Are you using temp tables? Those end up in pgsql_tmp as well.

Uh, no, they don't.

It might be useful to turn on trace_sort to see if the small files
are coming from sorts.  If they're from hashes I'm afraid there's
no handy instrumentation ...

            regards, tom lane

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

Предыдущее
От: decibel
Дата:
Сообщение: Re: [PERFORMANCE] work_mem vs temp files issue
Следующее
От: Joshua Rubin
Дата:
Сообщение: Re: Persistent Plan Cache