Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 4265F64FCD9 for ; Sat, 13 Sep 2008 18:21:12 -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 12714-02 for ; Sat, 13 Sep 2008 18:21:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from bifrost.lang.hm (mail.lang.hm [64.81.33.126]) by postgresql.org (Postfix) with ESMTP id 15C6664FCDE for ; Sat, 13 Sep 2008 18:21:08 -0300 (ADT) Received: from asgard.lang.hm (asgard.lang.hm [10.0.0.100]) by bifrost.lang.hm (8.13.4/8.13.4/Debian-3) with ESMTP id m8DLKtL0032249; Sat, 13 Sep 2008 14:21:01 -0700 Date: Sat, 13 Sep 2008 14:21:51 -0700 (PDT) From: david@lang.hm X-X-Sender: dlang@asgard.lang.hm To: James Mansion cc: Scott Carey , Greg Smith , pgsql-performance@postgresql.org Subject: Re: Effects of setting linux block device readahead size In-Reply-To: <48CA30ED.7030707@mansionfamily.plus.com> Message-ID: References: <70c01d1d0809092353r4ae687a3ycf3d99d43a5680cf@mail.gmail.com> <48C8AACD.5090702@mansionfamily.plus.com> <48C97793.2070909@mansionfamily.plus.com> <48CA30ED.7030707@mansionfamily.plus.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200809/167 X-Sequence-Number: 31480 On Fri, 12 Sep 2008, James Mansion wrote: > Scott Carey wrote: >> Consumer drives will often read-ahead much more than server drives >> optimized for i/o per second. > ... >> The Linux readahead setting is _definitely_ in the kernel, definitely uses >> and fills the page cache, and from what I can gather, simply issues extra >> I/O's to the hardware beyond the last one requested by an app in certain >> situations. It does not make your I/O request larger, it just queues an >> extra I/O following your request. > So ... fiddling with settings in Linux is going to force read-ahead, but the > read-ahead data will hit the controller cache and the system buffers. > > And the drives use their caches for cyclinder caching implicitly (maybe the > SATA drives appear to preread more because the storage density per cylinder > is higher?).. > > But is there any way for an OS or application to (portably) ask SATA, SAS or > SCSI drives to read ahead more (or less) than their default and NOT return > the data to the controller? > > I've never heard of such a thing, but I'm no expert in the command sets for > any of this stuff. I'm pretty sure that's not possible. the OS isn't supposed to even know the internals of the drive. David Lang > James > >> >> On Thu, Sep 11, 2008 at 12:54 PM, James Mansion >> > wrote: >> >> Greg Smith wrote: >> >> The point I was trying to make there is that even under >> impossibly optimal circumstances, you'd be hard pressed to >> blow out the disk's read cache with seek-dominated data even >> if you read a lot at each seek point. That idea didn't make >> it from my head into writing very well though. >> >> Isn't there a bigger danger in blowing out the cache on the >> controller and causing premature pageout of its dirty pages? >> >> If you could get the readahead to work on the drive and not return >> data to the controller, that might be dandy, but I'm sceptical. >> >> James >> >> >> >> -- Sent via pgsql-performance mailing list >> (pgsql-performance@postgresql.org >> ) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-performance >> >> > > >