X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 91E879DCD00 for ; Mon, 5 Dec 2005 12:44:58 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 83465-02 for ; Mon, 5 Dec 2005 12:44:57 -0400 (AST) X-Greylist: delayed 00:57:06.011565 by SQLgrey- Received: from fuse1.mailanyone.net (unknown [69.31.1.141]) by postgresql.org (Postfix) with ESMTP id 8D3E99DCD02 for ; Mon, 5 Dec 2005 12:44:56 -0400 (AST) Received: from mailanyone.net by fuse1.mailanyone.net with asmtp (TLSv1:AES256-SHA:256) (MailAnyone extSMTP) id 1EjJSM-0003Og-Ao for pgsql-performance@postgresql.org; Mon, 05 Dec 2005 10:44:50 -0600 Message-ID: <43946EA1.8090908@tgharold.com> Date: Mon, 05 Dec 2005 11:45:21 -0500 From: Thomas Harold User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.11) Gecko/20050728 X-Accept-Language: en-us, en, ja, zh-cn, zh-hk, zh-sg, zh-tw, ko, ko-kp, ko-kr MIME-Version: 1.0 CC: pgsql-performance@postgresql.org Subject: Re: two disks - best way to use them? References: <00fb01c5f772$59471410$0200a8c0@dell8200> <6.2.5.6.0.20051202145746.01dc7b68@earthlink.net> <43946148.9010607@tgharold.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.856 required=5 tests=[AWL=0.666, MISSING_HEADERS=0.189, UNPARSEABLE_RELAY=0.001] X-Spam-Score: 0.856 X-Spam-Level: X-Archive-Number: 200512/130 X-Sequence-Number: 15951 David Lang wrote: > the application can' tell the difference, but the reason for seperating > them isn't for the application, it's so that different pieces of > hardware can work on different things without having to bounce back and > forth between them. > > useing the same drives with LVM doesn't achieve this goal. > > the problem is that the WAL is doing a LOT of writes, and postgres waits > until each write is completed before going on to the next thing (for > safety), if a disk is dedicated to the WAL then the head doesn't move > much. if the disk is used for other things as well then the heads have > to move across the disk surface between the WAL and where the data is. > this drasticly slows down the number of items that can go into the WAL, > and therefor slows down the entire system. > > this slowdown isn't even something as simple as cutting your speed in > half (half the time spent working on the WAL, half spent on the data > itself), it's more like 10% spent on the WAL, 10% spent on the data, and > 80% moveing back and forth between them (I am probably wrong on the > exact numbers, but it is something similarly drastic) Yeah, I don't think I was clear about the config. It's (4) disks setup as a pair of RAID1 sets. My original config was pgsql on the first RAID set (data and WAL). I'm now experimenting with putting the data/pg_xlog folder on the 2nd set of disks. Under the old setup (everything on the original RAID1 set, in a dedicated 32GB LVM volume), I was seeing 80-90% wait percentages in "top". My understanding is that this is an indicator of an overloaded / bottlenecked disk system. This was while doing massive inserts into a test table (millions of narrow rows). I'm waiting to see what happens once I have data/pg_xlog on the 2nd disk set. Thanks for the input.