pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Carey <scott@richrelevance.com>
To: Matthew Wakeling <matthew@flymine.org>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Effects of setting linux block device readahead size
Date: Mon, 15 Sep 2008 10:33:38 -0700
Message-ID: <a1ec7d000809151033l496afaf1pa0d653164c4697cd@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.10.0809151717001.23198@aragorn.flymine.org>
References: <70c01d1d0809092353r4ae687a3ycf3d99d43a5680cf@mail.gmail.com>
	<Pine.GSO.4.64.0809101023520.15181@westnet.com>
	<a1ec7d000809111207x3f5aefb9ybc66c556c532084b@mail.gmail.com>
	<alpine.DEB.1.10.0809151717001.23198@aragorn.flymine.org>

Good question.  I'm in the process of completing more exhaustive tests with
the various disk i/o schedulers.

Basic findings so far:  it depends on what type of concurrency is going on.
Deadline has the best performance over a range of readahead values compared
to cfq or anticipatory with concurrent sequential reads with xfs.  However,
mixing random and sequential reads puts cfq ahead with low readahead values
and deadline ahead with large readahead values (I have not tried
anticipatory here yet).  However, your preference for prioritizing streaming
over random will significantly impact which you would want to use and at
what readahead value -- cfq does a better job at being consistent balancing
the two, deadline swings strongly to being streaming biased as the readahead
value gets larger and random biased when it is low.  Deadline and CFQ are
similar with concurrent random reads.  I have not gotten to any write tests
or concurrent read/write tests.

I expect the anticipatory scheduler to perform worse with mixed loads --
anything asking a raid array that can do 1000 iops to wait for 7 ms and do
nothing just in case a read in the same area might occur is a bad idea for
aggregate concurrent throughput.  It is a scheduler that assumes the
underlying hardware is essentially one spindle -- which is why it is so good
in a standard PC or laptop.   But, I could be wrong.

On Mon, Sep 15, 2008 at 9:18 AM, Matthew Wakeling <matthew@flymine.org>wrote:

> On Thu, 11 Sep 2008, Scott Carey wrote:
>
>> Preliminary summary:
>>
>> readahead  |  8 conc read rate  |  1 conc read rate
>> 49152  |  311  |  314
>> 16384  |  312  |  312
>> 12288  |  304  |  309
>>  8192  |  292  |
>>  4096  |  264  |
>>  2048  |  211  |
>>  1024  |  162  |  302
>>   512  |  108  |
>>   256  |  81  | 300
>>     8  |  38  |
>>
>
> What io scheduler are you using? The anticipatory scheduler is meant to
> prevent this slowdown with multiple concurrent reads.
>
> Matthew
>
>
> --
> And the lexer will say "Oh look, there's a null string. Oooh, there's
> another. And another.", and will fall over spectacularly when it realises
> there are actually rather a lot.
>        - Computer Science Lecturer (edited)
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
>

view thread (27+ messages)

Message-ID: <a1ec7d000809151033l496afaf1pa0d653164c4697cd@mail.gmail.com>
Permalink:  ../a1ec7d000809151033l496afaf1pa0d653164c4697cd@mail.gmail.com/
Also on:    postgresql.org/message-id/a1ec7d000809151033l496afaf1pa0d653164c4697cd@mail.gmail.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: scott@richrelevance.com, matthew@flymine.org
  Subject: Re: Effects of setting linux block device readahead size
  In-Reply-To: <a1ec7d000809151033l496afaf1pa0d653164c4697cd@mail.gmail.com>
  References: <70c01d1d0809092353r4ae687a3ycf3d99d43a5680cf@mail.gmail.com> <Pine.GSO.4.64.0809101023520.15181@westnet.com> <a1ec7d000809111207x3f5aefb9ybc66c556c532084b@mail.gmail.com> <alpine.DEB.1.10.0809151717001.23198@aragorn.flymine.org> <a1ec7d000809151033l496afaf1pa0d653164c4697cd@mail.gmail.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