Re: How to reduce writing on disk ? (90 gb on pgsql_tmp)

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: How to reduce writing on disk ? (90 gb on pgsql_tmp)
Дата
Msg-id 556F7FD8.5070802@commandprompt.com
обсуждение исходный текст
Ответ на Re: How to reduce writing on disk ? (90 gb on pgsql_tmp)  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: How to reduce writing on disk ? (90 gb on pgsql_tmp)  (Yves Dorfsman <yves@zioup.com>)
Re: How to reduce writing on disk ? (90 gb on pgsql_tmp)  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-performance
On 06/03/2015 03:16 PM, Tomas Vondra wrote:

> What is more important, though, is the amount of memory. OP reported the
> query writes ~95GB of temp files (and dies because of full disk, so
> there may be more). The on-disk format is usually more compact than the
> in-memory representation - for example on-disk sort often needs 3x less
> space than in-memory qsort. So we can assume the query needs >95GB of
> data. Can you explain how that's going to fit into the 64GB RAM?
>
>> Cache is free memory. If you think of it any other way when you're
>> looking at memory usage and pressure on theings like swap you're
>> gonna make some bad decisions.
>
> Cache is not free memory - it's there for a purpose and usually plays a
> significant role in performance. Sure, it may be freed and used for
> other purposes, but that has consequences - e.g. it impacts performance
> of other queries etc. You generally don't want to do that on production.

Exactly. If your cache is reduced your performance is reduced because
less things are in cache. It is not free memory. Also the command "free"
is not useful in this scenario. It is almost always better to use sar so
you can see where the data points are that free is using.

Sincerely,

JD



--
Command Prompt, Inc. - http://www.commandprompt.com/  503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Announcing "I'm offended" is basically telling the world you can't
control your own emotions, so everyone else should do it for you.


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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: How to reduce writing on disk ? (90 gb on pgsql_tmp)
Следующее
От: Yves Dorfsman
Дата:
Сообщение: Re: How to reduce writing on disk ? (90 gb on pgsql_tmp)