Re: General performance/load issue

From: "Tomas Vondra" <tv(at)fuzzy(dot)cz>
To: "Gaëtan Allart" <gaetan(at)nexylan(dot)com>
Cc: "Tomas Vondra" <tv(at)fuzzy(dot)cz>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: General performance/load issue
Date: 2011-11-27 11:01:18
Message-ID: 93cb3828e3bb72104be404ce56e26e08.squirrel@sq.gransy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 27 Listopad 2011, 10:45, Gaëtan Allart wrote:
> Actually, this is because I changed sort_mem to 4 Mb as asked by Robert.
>
> I removed this setting..

This is exactly the reason why it's recommended not to do any changes
until it's reasonably certain what is the caause.

Did increasing the work_mem again solved the issues? Is the database
running fine?

If no, post the iotop output again, so we can see what was the impact. And
post the EXPLAIN ANALYZE of the query, so we can see if the estimates are
OK.

Anyway, Rober was right - the work_mem=128MB is rather large and should be
decreased. Use something like a binary search to find the right value -
use 64MB and watch the log for temp file messages. If there's a lot of
messages, choose the upper interval and set (64+128)/2 = 96MB, otherwise
32MB. And so on. That should lead you to the minimal work_mem value.

Tomas

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2011-11-27 14:29:03 Re: text search synonym dictionary anomaly with numbers
Previous Message frank 2011-11-27 10:17:12 Re: CPU move