X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 889D8D1B89E for ; Mon, 18 Aug 2003 19:17:37 -0300 (ADT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 90130-07 for ; Mon, 18 Aug 2003 19:17:27 -0300 (ADT) Received: from fuji.krosing.net (unknown [194.204.44.104]) by svr1.postgresql.org (Postfix) with ESMTP id 56FC8D1B56B for ; Mon, 18 Aug 2003 19:17:24 -0300 (ADT) Received: from fuji.krosing.net (localhost.localdomain [127.0.0.1]) by fuji.krosing.net (8.12.8/8.12.8) with ESMTP id h7IMHBsQ004554; Tue, 19 Aug 2003 01:17:12 +0300 Received: (from hannu@localhost) by fuji.krosing.net (8.12.8/8.12.8/Submit) id h7IMGw3D004552; Tue, 19 Aug 2003 01:16:58 +0300 X-Authentication-Warning: fuji.krosing.net: hannu set sender to hannu@tm.ee using -f Subject: Re: Insert performance From: Hannu Krosing To: shridhar_daithankar@persistent.co.in Cc: pgsql-performance@postgresql.org In-Reply-To: <3F4145EB.20645.B5452D9@localhost> References: <3F40BDC4.1605.9407ADF@localhost> <3F4145EB.20645.B5452D9@localhost> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1061245017.2620.14.camel@fuji.krosing.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Tue, 19 Aug 2003 01:16:58 +0300 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/290 X-Sequence-Number: 3106 Shridhar Daithankar kirjutas E, 18.08.2003 kell 19:02: > On 18 Aug 2003 at 18:52, Hannu Krosing wrote: > > My own experimentation also got numbers in 9k/sec range (on a quad > > 1.3GHz Xeons, 2GM mem, 50MB/sec raid) when doing 10-20 parallel runs of > > ~1000 inserts/transaction. > > > > Performance dropped to ~300/sec (at about 60M rows) when I added an > > index (primary key) - as I did random inserts, the hit rates for index > > pages were probably low. > > I was loading a geographic data couple of months back.. It was 3GB data when > loaded in postgresql. With or without indexes ? > I tried loading data first and creating index later. It ran out of available > 9GB space. So I created index on an empty table and started loading it. It was > slow but at least finished after 3 hours... Co-incidentally oracle had same > problems as well. So creating index beforehand remains only option at times, it > seems. Tom remarked that it shouldn't have made difference but apparently it > does.. Tom just fixed some memory leaks on array indexing the other day. Could there be something like that on geographic types ? > You mentioned parallel runs and still getting 9K/sec. Was that overall 9K or > per connection? Overall. But notice that my setup was (a little) slower per processor. > If it is former, probably WAL is hit too hard. You could do > some additional testing by having WALit's own disk. I guess that todays IDE disks are about the same speed (~50MB/sec) as my test RAID was. I run multiple parallel runs to have a chance to use all 4 processors (but IIRC it was heavyly IO-bound) as well as to better use writing time on WAL platters (not to wait for full rotation on each platter) -------------- Hannu