Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 6D69E9FB280 for ; Mon, 30 Oct 2006 11:23:26 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 72310-04 for ; Mon, 30 Oct 2006 15:23:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exprod6og56.obsmtp.com (exprod6og56.obsmtp.com [64.18.1.208]) by postgresql.org (Postfix) with SMTP id 3FE289FA326 for ; Mon, 30 Oct 2006 11:23:24 -0400 (AST) Received: from source ([63.240.6.47]) by exprod6ob56.postini.com ([64.18.5.12]) with SMTP; Mon, 30 Oct 2006 07:23:21 PST Received: from 172.16.1.114 by mail.Mi8.com with ESMTP (- Welcome to Mi8 Corporation www.Mi8.com (D1)); Mon, 30 Oct 2006 10:23:13 -0500 X-Server-Uuid: 241911D6-425B-44B9-A073-E3FE0F8FC774 Received: from MI8NYCMAIL06.Mi8.com ([172.16.1.175]) by d01smtp07.Mi8.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 30 Oct 2006 10:23:09 -0500 Received: from 69.181.100.71 ([69.181.100.71]) by MI8NYCMAIL06.Mi8.com ( [172.16.1.219]) via Exchange Front-End Server mi8owa.mi8.com ( [172.16.1.105]) with Microsoft Exchange Server HTTP-DAV ; Mon, 30 Oct 2006 15:23:09 +0000 User-Agent: Microsoft-Entourage/11.2.5.060620 Date: Mon, 30 Oct 2006 07:23:07 -0700 Subject: Re: Best COPY Performance From: "Luke Lonergan" To: "Spiegelberg, Greg" , "Worky Workerson" , "Merlin Moncure" cc: pgsql-performance@postgresql.org Message-ID: Thread-Topic: [PERFORM] Best COPY Performance Thread-Index: Acb6Ro75zcnEF2Y5EduYOAAWy4o9DAB4rupAAAOAkH4= In-Reply-To: <82E74D266CB9B44390D3CCE44A781ED90177807C@POSTOFFICE.cranel.local> MIME-Version: 1.0 X-OriginalArrivalTime: 30 Oct 2006 15:23:09.0432 (UTC) FILETIME=[4E565780:01C6FC37] X-WSS-ID: 6958C7573WC4116220-02-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/612 X-Sequence-Number: 21741 Greg, On 10/30/06 7:09 AM, "Spiegelberg, Greg" wrote: > I broke that file into 2 files each of 550K rows and performed 2 > simultaneous COPY's after dropping the table, recreating, issuing a sync > on the system to be sure, &c and nearly every time both COPY's finish in > 12 seconds. About a 20% gain to ~91K rows/second. > > Admittedly, this was a pretty rough test but a 20% savings, if it can be > put into production, is worth exploring for us. Did you see whether you were I/O or CPU bound in your single threaded COPY? A 10 second "vmstat 1" snapshot would tell you/us. With Mr. Workerson (:-) I'm thinking his benefit might be a lot better because the bottleneck is the CPU and it *may* be the time spent in the index building bits. We've found that there is an ultimate bottleneck at about 12-14MB/s despite having sequential write to disk speeds of 100s of MB/s. I forget what the latest bottleneck was. - Luke