pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bill Moran <wmoran@collaborativefusion.com>
To: Marinos Yannikos <mjy@geizhals.at>
Cc: pgsql-performance@postgresql.org
Subject: Re: Background writer underemphasized ...
Date: Wed, 16 Apr 2008 14:43:35 -0400
Message-ID: <20080416144335.04368b67.wmoran@collaborativefusion.com> (raw)
In-Reply-To: <480619CA.2080904@geizhals.at>
References: <480619CA.2080904@geizhals.at>

In response to Marinos Yannikos <mjy@geizhals.at>:

> Hi,
> 
> to save some people a headache or two: I believe we just solved our 
> performance problem in the following scenario:
> 
> - Linux 2.6.24.4
> - lots of RAM (32GB)
> - enough CPU power (4 cores)
> - disks with relatively slow random writes (SATA RAID-5 / 7 disks, 128K 
> stripe, ext2)
> 
> Our database is around 86GB, the busy parts being 20-30GB. Typical load 
> is regular reads of all sizes (large joins, sequential scans on a 8GB 
> table, many small selects with few rows) interspersed with writes of 
> several 1000s rows on the busier tables by several clients.
> 
> After many tests and research revolving around the Linux I/O-Schedulers 
> (which still have some issues one should be wary about: 
> http://lwn.net/Articles/216853/) because we saw problems when occasional 
> (intensive) writes completely starved all I/O, we discovered that 
> changing the default settings for the background writer seems to have 
> solved all these problems. Performance is much better now with fsync on 
> than it was with fsync off previously, no other configuration options 
> had a noticeable effect on performance (or these problems rather).
> 
> This helped with our configuration:
> bgwriter_delay = 10000ms         # 10-10000ms between rounds
> bgwriter_lru_maxpages = 1000     # 0-1000 max buffers written/round

What other values have you tried for this?  Have you watched closely
under load to ensure that you're not seeing a huge performance hit
every 10s when the bgwriter kicks off?

I'm with Chris -- I would be inclined to try a range of values to find
a sweet spot, and I would be _very_ shocked to find that sweet spot
at the values you mention.  However, if that really is the demonstrable
sweet spot, there may be something we all can learn.

-- 
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran@collaborativefusion.com
Phone: 412-422-3463x4023



view thread (12+ messages)  latest in thread

Message-ID: <20080416144335.04368b67.wmoran@collaborativefusion.com>
Permalink:  ../20080416144335.04368b67.wmoran@collaborativefusion.com/
Also on:    postgresql.org/message-id/20080416144335.04368b67.wmoran@collaborativefusion.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: wmoran@collaborativefusion.com, mjy@geizhals.at
  Subject: Re: Background writer underemphasized ...
  In-Reply-To: <20080416144335.04368b67.wmoran@collaborativefusion.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox