Re: Automatic adjustment of bgwriter_lru_maxpages

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Greg Smith <gsmith(at)gregsmith(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Automatic adjustment of bgwriter_lru_maxpages
Date: 2007-05-14 09:04:58
Message-ID: 20070514174531.71E0.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches pgsql-performance

Greg Smith <gsmith(at)gregsmith(dot)com> wrote:

> The first patch (buf-alloc-stats) takes the two most interesting pieces of
> data the original patch collected, the number of buffers allocated
> recently and the number that the clients wrote out, and ties all that into
> the new stats structure.

> The second patch (limit-lru) adds on top of that a constraint of the LRU
> writer so that it doesn't do any more work than it has to.

Both patches look good.

> Now we get to the controversial part. The original patch removed the
> bgwriter_lru_maxpages parameter and updated the documentation accordingly.
> I didn't do that here. The reason is that after playing around in this
> area I'm not convinced yet I can satisfy all the tuning scenarios I'd like
> to be able to handle that way. I describe this patch as enforcing a
> constraint instead; it allows you to set the LRU parameters much higher
> than was reasonable before without having to be as concerned about the LRU
> writer wasting resources.

I'm agreeable to the limiters of resource usage by bgwriter.
BTW, your patch will cut LRU writes short, but will not encourage to
do more works. So should set more aggressive values to bgwriter_lru_percent
and bgwriter_lru_maxpages as defaults? My original motivation was to enlarge
bgwriter_lru_maxpages automatically; the default bgwriter_lru_maxpages (=5)
seemed to be too small.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2007-05-14 09:27:58 Re: Concurrently updating an updatable view
Previous Message Hiroshi Inoue 2007-05-14 08:59:53 Re: Concurrently updating an updatable view

Browse pgsql-patches by date

  From Date Subject
Next Message Gregory Stark 2007-05-14 09:44:22 Re: [PATCHES] OS/X startup scripts
Previous Message Peter Eisentraut 2007-05-14 07:57:51 Re: [PATCHES] On patching without write access to CVS

Browse pgsql-performance by date

  From Date Subject
Next Message Greg Smith 2007-05-14 13:34:21 Re: Automatic adjustment of bgwriter_lru_maxpages
Previous Message Richard Huxton 2007-05-14 09:03:26 Re: 500 requests per second