Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id B34C09FB280 for ; Mon, 30 Oct 2006 12:22:46 -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 64421-04 for ; Mon, 30 Oct 2006 12:22:42 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from cronos.madness.at (madness.at [217.196.146.217]) by postgresql.org (Postfix) with ESMTP id A68C99FB29A for ; Mon, 30 Oct 2006 12:22:42 -0400 (AST) Received: from gateway.conova.com ([213.153.32.181] helo=[192.168.1.129]) by cronos.madness.at with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.62 (FreeBSD)) (envelope-from ) id 1GeZuA-0005QL-6V; Mon, 30 Oct 2006 17:22:38 +0100 Message-ID: <45462710.3000301@kaltenbrunner.cc> Date: Mon, 30 Oct 2006 17:23:44 +0100 From: Stefan Kaltenbrunner User-Agent: Thunderbird 1.5.0.7 (X11/20060928) MIME-Version: 1.0 To: Luke Lonergan CC: "Spiegelberg, Greg" , Worky Workerson , Merlin Moncure , pgsql-performance@postgresql.org Subject: Re: Best COPY Performance References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/617 X-Sequence-Number: 21746 Luke Lonergan wrote: > 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). yes I did that about half a year ago as part of the CREATE INDEX on a 1,8B row table thread on -hackers that resulted in some some the sorting improvements in 8.2. I don't think there is much more possible in terms of import speed by using more cores (at least not when importing to the same table) - iirc I was at nearly 700k/s with two cores and 850k/s with 3 cores or such ... > > 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. yeah that is a good questions (and part of the reason why I cited the rows/sec number btw.) Stefan