Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id F163D9FB1D5 for ; Wed, 25 Oct 2006 12:07:22 -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 15039-03-2 for ; Wed, 25 Oct 2006 15:06:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exprod6og54.obsmtp.com (exprod6og54.obsmtp.com [64.18.1.189]) by postgresql.org (Postfix) with SMTP id 13E9A9FA344 for ; Wed, 25 Oct 2006 12:06:58 -0300 (ADT) Received: from source ([63.240.6.46]) by exprod6ob54.postini.com ([64.18.5.12]) with SMTP; Wed, 25 Oct 2006 08:06:47 PDT Received: from 172.16.1.110 by mail.mi8.com with ESMTP (- Welcome to Mi8 Corporation www.Mi8.com (D2)); Wed, 25 Oct 2006 11:06:39 -0400 X-Server-Uuid: 7829E76E-BB9E-4995-8473-3C0929DF7DD1 Received: from MI8NYCMAIL06.Mi8.com ([172.16.1.175]) by D01SMTP01.Mi8.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 25 Oct 2006 11:06:39 -0400 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 ; Wed, 25 Oct 2006 15:06:39 +0000 User-Agent: Microsoft-Entourage/11.2.5.060620 Date: Wed, 25 Oct 2006 08:06:36 -0700 Subject: Re: Best COPY Performance From: "Luke Lonergan" To: "Worky Workerson" , "Craig A. James" cc: "Jim C. Nasby" , "Merlin Moncure" , pgsql-performance@postgresql.org Message-ID: Thread-Topic: [PERFORM] Best COPY Performance Thread-Index: Acb4RyojaGuCpmQ6EdujvAAWy4o9DA== In-Reply-To: MIME-Version: 1.0 X-OriginalArrivalTime: 25 Oct 2006 15:06:39.0145 (UTC) FILETIME=[2C03C990:01C6F847] X-WSS-ID: 6921A2F521W11870147-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/514 X-Sequence-Number: 21643 Mr. Worky Workerson, On 10/25/06 5:03 AM, "Worky Workerson" wrote: > 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? It's probable that you have a really poor performing disk configuration. Judging from earlier results, you may only be getting 3 x 5.7 = 17 MB/s of write performance to your disks, which is about 1/4 of a single disk drive. Please run this test and report the time here: 1) Calculate the size of 2x memory in 8KB blocks: # of blocks = 250,000 x memory_in_GB Example: 250,000 x 16GB = 4,000,000 blocks 2) Benchmark the time taken to write 2x RAM sequentially to your disk: time bash -c "dd if=/dev/zero of=bigfile bs=8k count=<# of blocks> && sync" 3) Benchmark the time taken to read same: time dd if=bigfile of=/dev/null bs=8k - Luke