Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id AE10964FCCD for ; Wed, 10 Sep 2008 13:32:53 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 12084-01 for ; Wed, 10 Sep 2008 13:32:50 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gx0-f17.google.com (mail-gx0-f17.google.com [209.85.217.17]) by postgresql.org (Postfix) with ESMTP id 0993164FCFD for ; Wed, 10 Sep 2008 13:32:49 -0300 (ADT) Received: by gxk10 with SMTP id 10so14049361gxk.19 for ; Wed, 10 Sep 2008 09:32:48 -0700 (PDT) Received: by 10.143.33.19 with SMTP id l19mr515907wfj.112.1221063985362; Wed, 10 Sep 2008 09:26:25 -0700 (PDT) Received: by 10.143.39.19 with HTTP; Wed, 10 Sep 2008 09:26:25 -0700 (PDT) Message-ID: Date: Wed, 10 Sep 2008 09:26:25 -0700 From: "Scott Carey" To: "Greg Smith" Subject: Re: Effects of setting linux block device readahead size Cc: "Mark Wong" , "pgsql-performance@postgresql.org" , "Gabrielle Roth" , "Selena Deckelmann" In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_37778_24351184.1221063985348" References: <70c01d1d0809092353r4ae687a3ycf3d99d43a5680cf@mail.gmail.com> X-Google-Sender-Auth: f8dab312f7b4da8c X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200809/107 X-Sequence-Number: 31420 ------=_Part_37778_24351184.1221063985348 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline How does that readahead tunable affect random reads or mixed random / sequential situations? In many databases, the worst case scenarios aren't when you have a bunch of concurrent sequential scans but when there is enough random read/write concurrently to slow the whole thing down to a crawl. How the file system behaves under this sort of concurrency I would be very interested in a mixed fio profile with a "background writer" doing moderate, paced random and sequential writes combined with concurrent sequential reads and random reads. -Scott On Wed, Sep 10, 2008 at 7:49 AM, Greg Smith wrote: > On Tue, 9 Sep 2008, Mark Wong wrote: > > I've started to display the effects of changing the Linux block device >> readahead buffer to the sequential read performance using fio. >> > > Ah ha, told you that was your missing tunable. I'd really like to see the > whole table of one disk numbers re-run when you get a chance. The reversed > ratio there on ext2 (59MB read/92MB write) was what tipped me off that > something wasn't quite right initially, and until that's fixed it's hard to > analyze the rest. > > Based on your initial data, I'd say that the two useful read-ahead settings > for this system are 1024KB (conservative but a big improvement) and 8192KB > (point of diminishing returns). The one-disk table you've got (labeled with > what the default read-ahead is) and new tables at those two values would > really flesh out what each disk is capable of. > > -- > * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD > > > -- > Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-performance > ------=_Part_37778_24351184.1221063985348 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
How does that readahead tunable affect random reads or mixed random / sequential situations?  In many databases, the worst case scenarios aren't when you have a bunch of concurrent sequential scans but when there is enough random read/write concurrently to slow the whole thing down to a crawl.   How the file system behaves under this sort of concurrency

I would be very interested in a mixed fio profile with a "background writer" doing moderate, paced random and sequential writes combined with concurrent sequential reads and random reads.

-Scott

On Wed, Sep 10, 2008 at 7:49 AM, Greg Smith <gsmith@gregsmith.com> wrote:
On Tue, 9 Sep 2008, Mark Wong wrote:

I've started to display the effects of changing the Linux block device
readahead buffer to the sequential read performance using fio.

Ah ha, told you that was your missing tunable.  I'd really like to see the whole table of one disk numbers re-run when you get a chance.  The reversed ratio there on ext2 (59MB read/92MB write) was what tipped me off that something wasn't quite right initially, and until that's fixed it's hard to analyze the rest.

Based on your initial data, I'd say that the two useful read-ahead settings for this system are 1024KB (conservative but a big improvement) and 8192KB (point of diminishing returns).  The one-disk table you've got (labeled with what the default read-ahead is) and new tables at those two values would really flesh out what each disk is capable of.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD


--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

------=_Part_37778_24351184.1221063985348--