Re: Fix overflow of bgwriter's request queue - Mailing list pgsql-patches

From Tom Lane
Subject Re: Fix overflow of bgwriter's request queue
Date
Msg-id 16035.1141344443@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fix overflow of bgwriter's request queue  (ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>)
Responses Re: Fix overflow of bgwriter's request queue  (ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>)
List pgsql-patches
ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I suspect it'd probably be sufficient to absorb requests every few times
>> through the fsync loop, too, if you want to experiment with that.

> In the above test, smgrsync took 50 sec for syncing 32 files. This means
> absorb are requested every 1.5 sec, which is less frequent than absorbs by
> normal activity of bgwriter (bgwriter_delay=200ms).

That seems awfully high to me --- 1.5 sec to fsync a segment file that
is never larger than 1Gb, and probably usually has much less than 1Gb
of dirty data?  I think you must have been testing an atypical case.

I've applied the attached modified version of your patch.  In this
coding, absorbs are done after every 1000 buffer writes in BufferSync
and after every 10 fsyncs in mdsync.  We may need to twiddle these
numbers but it seems at least in the right ballpark.  If you have time
to repeat your original test and see how this does, it'd be much
appreciated.

            regards, tom lane


Attachment

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: INS/UPD/DEL RETURNING for 8.2
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: New pg_dump options: exclude tables/schemas, multiple