Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 0452C632600 for ; Thu, 2 Apr 2009 14:58:48 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 76973-04 for ; Thu, 2 Apr 2009 14:58:46 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f167.google.com (mail-ew0-f167.google.com [209.85.219.167]) by mail.postgresql.org (Postfix) with ESMTP id 83032632545 for ; Thu, 2 Apr 2009 14:58:46 -0300 (ADT) Received: by ewy11 with SMTP id 11so959507ewy.19 for ; Thu, 02 Apr 2009 10:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=c149zs4hpyXXaG7shduLn/qdneofEDeiazTZhtW5IRY=; b=h3BvvK5q/+YhJmM5x1FasaZ59bKd/t5LimdvSVg217VYOBuSBEHjJV7KgizY5ULVvF J9h/SWVhNoYjzvHBIha70JRCniI5SWQ4ZryFMywkbeb4MSQlgSxV1az3D+l38gEIFbtU 5kdTbixod0jQlMIbCmcFxLaYm7zi4R80ovIoA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=i2pZ5wh5Bg8hS8HC1WI70F0YcpPqvKnq0y7LL16Tjq/9j6kCkSpu7EvJijtzFwdWB3 E8Iqpyl3HzOjKnwxhuIsVY0NYN3DUP8AYesW8Y+C3v+vZxhU6ZG6YY4KncS232gtpwUA RXEpSZEIIrZV4aTBuelQI/Zl5dsz4G6os3BbM= MIME-Version: 1.0 Received: by 10.210.90.20 with SMTP id n20mr179350ebb.72.1238695124531; Thu, 02 Apr 2009 10:58:44 -0700 (PDT) In-Reply-To: References: Date: Thu, 2 Apr 2009 13:58:44 -0400 Message-ID: Subject: Re: Raid 10 chunksize From: Merlin Moncure To: Scott Carey Cc: Greg Smith , Mark Kirkwood , "pgsql-performance@postgresql.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 200904/43 X-Sequence-Number: 33410 On Wed, Mar 25, 2009 at 12:16 PM, Scott Carey wro= te: > On 3/25/09 1:07 AM, "Greg Smith" wrote: >> On Wed, 25 Mar 2009, Mark Kirkwood wrote: >>> I'm thinking that the raid chunksize may well be the issue. >> >> Why? =A0I'm not saying you're wrong, I just don't see why that parameter >> jumped out as a likely cause here. >> > > If postgres is random reading or writing at 8k block size, and the raid > array is set with 4k block size, then every 8k random i/o will create TWO > disk seeks since it gets split to two disks. =A0 Effectively, iops will b= e cut > in half. I disagree. The 4k raid chunks are likely to be grouped together on disk and read sequentially. This will only give two seeks in special cases. Now, if the PostgreSQL block size is _smaller_ than the raid chunk size, random writes can get expensive (especially for raid 5) because the raid chunk has to be fully read in and written back out. But this is mainly a theoretical problem I think. I'm going to go out on a limb and say that for block sizes that are within one or two 'powers of two' of each other, it doesn't matter a whole lot. SSDs might be different, because of the 'erase' block which might be 128k, but I bet this is dealt with in such a fashion that you wouldn't really notice it when dealing with different block sizes in pg. merlin