Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id EA0E39FB29A for ; Mon, 30 Oct 2006 12:07:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 52048-08 for ; Mon, 30 Oct 2006 12:07:06 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exprod6og51.obsmtp.com (exprod6og51.obsmtp.com [64.18.1.183]) by postgresql.org (Postfix) with SMTP id F39329FB280 for ; Mon, 30 Oct 2006 12:06:44 -0400 (AST) Received: from source ([63.240.6.46]) by exprod6ob51.postini.com ([64.18.5.12]) with SMTP; Mon, 30 Oct 2006 08:06:37 PST Received: from 172.16.1.112 by mail.mi8.com with ESMTP (- Welcome to Mi8 Corporation www.Mi8.com (D2)); Mon, 30 Oct 2006 11:03:43 -0500 X-Server-Uuid: 7829E76E-BB9E-4995-8473-3C0929DF7DD1 Received: from MI8NYCMAIL06.Mi8.com ([172.16.1.175]) by D01SMTP02.Mi8.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 30 Oct 2006 11:03:43 -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 16:03:43 +0000 User-Agent: Microsoft-Entourage/11.2.5.060620 Date: Mon, 30 Oct 2006 08:03:41 -0700 Subject: Re: Best COPY Performance From: "Luke Lonergan" To: "Stefan Kaltenbrunner" cc: "Spiegelberg, Greg" , "Worky Workerson" , "Merlin Moncure" , pgsql-performance@postgresql.org Message-ID: Thread-Topic: [PERFORM] Best COPY Performance Thread-Index: Acb8PPeqNfqbKGgwEduGtgAWy4o9DA== In-Reply-To: <454620DF.1000003@kaltenbrunner.cc> MIME-Version: 1.0 X-OriginalArrivalTime: 30 Oct 2006 16:03:43.0536 (UTC) FILETIME=[F92D2300:01C6FC3C] X-WSS-ID: 6958FDD52ZG1817762-01-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/616 X-Sequence-Number: 21745 Stefan, On 10/30/06 8:57 AM, "Stefan Kaltenbrunner" wrote: >> 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. > > I have personally managed to load a bit less then 400k/s (5 int columns > no indexes) - on very fast disk hardware - at that point postgresql is > completely CPU bottlenecked (2,6Ghz Opteron). 400,000 rows/s x 4 bytes/column x 5 columns/row = 8MB/s > Using multiple processes to load the data will help to scale up to about > 900k/s (4 processes on 4 cores). 18MB/s? Have you done this? I've not seen this much of an improvement before by using multiple COPY processes to the same table. Another question: how to measure MB/s - based on the input text file? On the DBMS storage size? We usually consider the input text file in the calculation of COPY rate. - Luke