Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 0269664FCD2 for ; Thu, 11 Sep 2008 18:40:22 -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 24672-07 for ; Thu, 11 Sep 2008 18:40:17 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.170]) by postgresql.org (Postfix) with ESMTP id C2AD764FCD5 for ; Thu, 11 Sep 2008 18:40:16 -0300 (ADT) Received: by wf-out-1314.google.com with SMTP id 25so486045wfc.28 for ; Thu, 11 Sep 2008 14:40:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=2ob1/bESSMO7YU7DCUh1di/jpq5xWQH/JTJnlwiW1as=; b=E8VH8J4oGP0SzYlJGSxgmGDuHW9AjJP1gjcAWJ+3O1gpPSLFX2PZ6uX/s5qwrTbsgK hhMMJyWcbKbR0oMc1wXfUeLpmETIhO3bGk1QKizVJRbqwMGkSpgXay5iLF4/32OVkMR2 kyJMer60uVm46SEgay6cRM+VdX6QAEuKGd50Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=TRt2i+GTzJimjjJTQkOENq51JAWbAG+EtQS1M+FueZai2h1BJbnKLeEL1T+jaWa+FK toY2NYgklyt2+/BXByfjNlyBKSvGzY+cUFdQcp7tMFmQQB81JMSV8pmPJ+qDL5XsSgrj tjkN378orE6IceegkrvrGvs10lEDQxKhzQwAg= Received: by 10.141.170.9 with SMTP id x9mr2110397rvo.90.1221169215093; Thu, 11 Sep 2008 14:40:15 -0700 (PDT) Received: by 10.141.74.11 with HTTP; Thu, 11 Sep 2008 14:40:15 -0700 (PDT) Message-ID: Date: Thu, 11 Sep 2008 15:40:15 -0600 From: "Scott Marlowe" To: david@lang.hm Subject: Re: Effects of setting linux block device readahead size Cc: "Scott Carey" , "James Mansion" , "Greg Smith" , pgsql-performance@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <70c01d1d0809092353r4ae687a3ycf3d99d43a5680cf@mail.gmail.com> <48C8AACD.5090702@mansionfamily.plus.com> <48C97793.2070909@mansionfamily.plus.com> 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/149 X-Sequence-Number: 31462 On Thu, Sep 11, 2008 at 3:36 PM, wrote: > On Thu, 11 Sep 2008, Scott Carey wrote: > >> Drives have their own read-ahead in the firmware. Many can keep track of >> 2 >> or 4 concurrent file accesses. A few can keep track of more. This also >> plays in with the NCQ or SCSI command queuing implementation. >> >> Consumer drives will often read-ahead much more than server drives >> optimized >> for i/o per second. >> The difference in read-ahead sensitivity between the two setups I tested >> may >> be due to one setup using nearline-SAS (SATA, tuned for io-per sec using >> SAS >> firmware) and the other used consumer SATA. >> For example, here is one "nearline SAS" style server tuned drive versus a >> consumer tuned one: >> >> http://www.storagereview.com/php/benchmark/suite_v4.php?typeID=10&testbedID=4&osID=6&raidconfigID=1&numDrives=1&devID_0=354&devID_1=348&devCnt=2 >> >> 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. > > that extra I/O will be merged with your request by the I/O scheduler code so > that by the time it gets to the drive it will be a single request. > > by even if it didn't, most modern drives read the entire cylinder into their > buffer so any additional requests to the drive will be satisfied from this > buffer and not have to wait for the disk itself. Generally speaking I agree, but I would still make a separate logical partition for pg_xlog so that if the OS fills up the /var/log dir or something, it doesn't impact the db.