Re: checkpoint spikes - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: checkpoint spikes
Date
Msg-id 20100611194854.GA23114@svana.org
Whole thread Raw
In response to Re: checkpoint spikes  (Greg Smith <greg@2ndquadrant.com>)
Responses Re: checkpoint spikes  (Janning <ml@planwerk6.de>)
List pgsql-general
On Thu, Jun 10, 2010 at 04:00:54PM -0400, Greg Smith wrote:
>> 5. Does anybody know if I can set dirty_background_ratio to 0.5? As we
>> have 12 GB RAM and rather slow disks 0,5% would result in a maximum of
>> 61MB dirty pages.
>
> Nope.  Linux has absolutely terrible controls for this critical
> performance parameter.   The sort of multi-second spikes you're seeing
> are extremely common and very difficult to get rid of.

Another relevent parameter is /proc/sys/vm/dirty_writeback_centisecs.
By default linux only wakes up once every 5 seconds to check if there
is stuff to write out. I have found that reducing this tends to smooth
out bursty spikes. However, see:

http://www.westnet.com/~gsmith/content/linux-pdflush.htm

which indicates that kernel may try to defeat you here...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patriotism is when love of your own people comes first; nationalism,
> when hate for people other than your own comes first.
>                                       - Charles de Gaulle

Attachment

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: How to show the current schema or search path in the psql PROMP
Next
From: Robert Gravsjö
Date:
Subject: Re: Cognitive dissonance