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 E265F9DCD0B for ; Mon, 5 Dec 2005 11:47: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 74391-07 for ; Mon, 5 Dec 2005 11:48:03 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr2.postgresql.org (svr2.postgresql.org [65.19.161.25]) by postgresql.org (Postfix) with ESMTP id 5CA5B9DCD65 for ; Mon, 5 Dec 2005 11:47:56 -0400 (AST) Received: from fuse1.mailanyone.net (unknown [69.31.1.141]) by svr2.postgresql.org (Postfix) with ESMTP id 1BB87F0B1C for ; Mon, 5 Dec 2005 15:47:59 +0000 (GMT) Received: from mailanyone.net by fuse1.mailanyone.net with asmtp (TLSv1:AES256-SHA:256) (MailAnyone extSMTP) id 1EjIZB-0002Jd-OW for pgsql-performance@postgresql.org; Mon, 05 Dec 2005 09:47:51 -0600 Message-ID: <43946148.9010607@tgharold.com> Date: Mon, 05 Dec 2005 10:48:24 -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> In-Reply-To: <6.2.5.6.0.20051202145746.01dc7b68@earthlink.net> 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=1.522 required=5 tests=[MISSING_HEADERS=0.189, RCVD_IN_BL_SPAMCOP_NET=1.332, UNPARSEABLE_RELAY=0.001] X-Spam-Score: 1.522 X-Spam-Level: * X-Archive-Number: 200512/128 X-Sequence-Number: 15949 Ron wrote: > At 01:58 PM 12/2/2005, Rick Schumeyer wrote: > >> I installed another drive in my linux pc in an attempt to improve >> performance >> on a large COPY to a table with a geometry index. >> >> Based on previous discussion, it seems there are three things >> competing for the hard drive: >> >> 1) the input data file >> 2) the pg table >> 3) the WAL >> >> What is the best way to distribute these among two drives? From Tom's >> comments >> I would think that the pg table and the WAL should be separate. Does >> it matter where the input data is? > > > Best is to have 3 HD or HD sets, one for each of the above. > > With only 2, and assuming the input file is too large to fit completely > into RAM at once, I'd test to see whether: > a= input on one + pg table & WAL on the other, or > b= WAL on one + pg table & input file on the other > is best. > > If the input file can be made 100% RAM resident, then use > c= pg table on one + WAL and input file on the other. > > The big goal here is to minimize HD head seeks. (noob question incoming) Section 26.4 WAL Internals http://www.postgresql.org/docs/8.1/interactive/wal-internals.html This seems to be the applicable chapter. They talk about creating a symlink for the data/pg_xlog folder to point at another disk set. If I have (2) RAID1 sets with LVM2, can I instead create a logical volume on the 2nd disk set and just mount data/pg_xlog to point at the logical volume on the 2nd disk set? For example, I have an LVM on my primary mirror called 'pgsql'. And I've created a 2nd LVM on my secondary mirror called 'pgxlog'. These are mounted as: /dev/vgraida/pgsql on /var/lib/postgresql type ext3 (rw,noatime) /dev/vgraidb/pgxlog on /var/lib/postgresql/data/pg_xlog type ext3 (rw,noatime) From the application's P.O.V., it's the same thing, right? (It seems to be working, I'm just trying to double-check that I'm not missing something.)