Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 2C7C59FB2BD for ; Wed, 25 Oct 2006 09:10:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 41707-10 for ; Wed, 25 Oct 2006 12:10:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.206]) by postgresql.org (Postfix) with ESMTP id AD2F99FB29E for ; Wed, 25 Oct 2006 09:10:20 -0300 (ADT) Received: by nz-out-0102.google.com with SMTP id i11so74335nzi for ; Wed, 25 Oct 2006 05:10:19 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Wet59KSsvoZNijjw//7eoiNWSSkV+VtAz6sAmb9uJSZFABhUitaVky3hYQCSrZWd/rwkzMx4LRP6VxvrjB8kV9SlBPrHZLjytHSZcTZqmlZALchTk8pR9x1jws8m/TV3i7Rv9EfmyDdYWAgYYQIYCVQqDmA6iJelX89lGswQ9O0= Received: by 10.35.88.18 with SMTP id q18mr911498pyl; Wed, 25 Oct 2006 05:03:38 -0700 (PDT) Received: by 10.35.53.3 with HTTP; Wed, 25 Oct 2006 05:03:38 -0700 (PDT) Message-ID: Date: Wed, 25 Oct 2006 08:03:38 -0400 From: "Worky Workerson" To: "Craig A. James" Subject: Re: Best COPY Performance Cc: "Jim C. Nasby" , "Merlin Moncure" , pgsql-performance@postgresql.org In-Reply-To: <453EF7C4.2040105@modgraph-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061023215913.GW26892@nasby.net> <20061025001709.GA26892@nasby.net> <453EF7C4.2040105@modgraph-usa.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.199 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/511 X-Sequence-Number: 21640 On 10/25/06, Craig A. James wrote: > Jim C. Nasby wrote: > > Well, given that perl is using an entire CPU, it sounds like you should > > start looking either at ways to remove some of the overhead from perl, > > or to split that perl into multiple processes. > > I use Perl for big database copies (usually with some processing/transformation along the > way) and I've never seen 100% CPU usage except for brief periods, even when copying > BLOBS and such. My typical copy divides operations into blocks, for example doing I'm just doing CSV style transformations (and calling a lot of functions along the way), but the end result is a straight bulk load of data into a blank database. And we've established that Postgres can do *way* better than what I am seeing, so its not suprising that perl is using 100% of a CPU. However, I am still curious as to the rather slow COPYs from psql to local disks. Like I mentioned previously, I was only seeing about 5.7 MB/s (1.8 GB / 330 seconds), where it seemed like others were doing substantially better. What sorts of things should I look into? Thanks!