Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id EEAA9BBFA13 for ; Tue, 15 Nov 2011 22:16:38 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 09008-09 for ; Wed, 16 Nov 2011 02:16:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 80F66BBFA1C for ; Tue, 15 Nov 2011 22:16:30 -0400 (AST) Received: from ns2.gransy.com ([89.187.132.100] helo=elizabeth.gransy.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RQV38-0003Mv-D1 for pgsql-performance@postgresql.org; Wed, 16 Nov 2011 02:16:30 +0000 Received: from sq.gransy.com (localhost [127.0.0.1]) by elizabeth.gransy.com (Postfix) with ESMTP id 9535915E4305; Wed, 16 Nov 2011 03:16:15 +0100 (CET) Received: from 78.45.133.255 (SquirrelMail authenticated user tv@fuzzy.cz) by sq.gransy.com with HTTP; Wed, 16 Nov 2011 03:16:15 +0100 Message-ID: In-Reply-To: References: <87e450fd65045c328f41e1b99a4029d5.squirrel@sq.gransy.com> <4EC30F05.6010901@fuzzy.cz> Date: Wed, 16 Nov 2011 03:16:15 +0100 Subject: Re: Slow queries / commits, mis-configuration or hardware issues? From: "Tomas Vondra" To: "Cody Caughlan" Cc: "Tomas Vondra" , pgsql-performance@postgresql.org User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 X-Priority: 3 (Normal) Importance: Normal Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201111/188 X-Sequence-Number: 45699 On 16 Listopad 2011, 2:21, Cody Caughlan wrote: > How did you build your RAID array? Maybe I have a fundamental flaw / > misconfiguration. I am doing it via: > > $ yes | mdadm --create /dev/md0 --level=3D10 -c256 --raid-devices=3D4 > /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde > $ pvcreate /dev/md0 > $ vgcreate lvm-raid10 /dev/md0 > $ lvcreate -l 215021 lvm-raid10 -n lvm0 > $ blockdev --setra 65536 /dev/lvm-raid10/lvm0 > $ mkfs.xfs -f /dev/lvm-raid10/lvm0 > $ mkdir -p /data && mount -t xfs -o noatime /dev/lvm-raid10/lvm0 /data > > -- I don't think you have a flaw there. The workload probably skews the results a bit on the master and slave, so it's difficult to compare it to results from an idle instance. The amount of data written seems small, bu= t a random i/o can saturated the devices quite easily. I went with a very simple raid config - no LVM, default stripe size (better seeks, worse sequential performance), default read-ahead (could give better seq. performance). Tomas