X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id AA3369FA506 for ; Wed, 26 Jul 2006 12:21:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 80203-09 for ; Wed, 26 Jul 2006 12:21:00 -0300 (ADT) X-Greylist: whitelisted by SQLgrey- Received: from smtp1-g19.free.fr (smtp1-g19.free.fr [212.27.42.27]) by postgresql.org (Postfix) with ESMTP id 0896A9FA4E0 for ; Wed, 26 Jul 2006 12:21:01 -0300 (ADT) Received: from imp3-g19.free.fr (imp3-g19.free.fr [212.27.42.3]) by smtp1-g19.free.fr (Postfix) with ESMTP id 3ADC1908F7 for ; Wed, 26 Jul 2006 17:20:59 +0200 (CEST) Received: by imp3-g19.free.fr (Postfix, from userid 33) id 7347481FB; Wed, 26 Jul 2006 17:34:47 +0200 (CEST) Received: from gatei2.nameshield.net (gatei2.nameshield.net [82.245.54.114]) by imp3-g19.free.fr (IMP) with HTTP for ; Wed, 26 Jul 2006 17:34:47 +0200 Message-ID: <1153928087.44c78b975f3a7@imp3-g19.free.fr> Date: Wed, 26 Jul 2006 17:34:47 +0200 From: nuggets72@free.fr To: pgsql-performance@postgresql.org Subject: loading increase into huge table with 50.000.000 records MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.5 X-Originating-IP: 82.245.54.114 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.961 tagged_above=0 required=5 tests=NO_REAL_NAME X-Spam-Level: X-Archive-Number: 200607/235 X-Sequence-Number: 20095 Hello, Sorry for my poor english, My problem : I meet some performance problem during load increase. massive update of 50.000.000 records and 2.000.000 insert with a weekly frequency in a huge table (+50.000.000 records, ten fields, 12 Go on hard disk) current performance obtained : 120 records / s At the beginning, I got a better speed : 1400 records/s CPU : bi xeon 2.40GHz (cache de 512KB) postgresql version : 8.1.4 OS : debian Linux sa 2.6.17-mm2 Hard disk scsi U320 with scsi card U160 on software RAID 1 Memory : only 1 Go at this time. My database contains less than ten tables. But the main table takes more than 12 Go on harddisk. This table has got ten text records and two date records. I use few connection on this database. I try many ideas : - put severals thousands operations into transaction (with BEGIN and COMMIT) - modify parameters in postgres.conf like shared_buffers (several tests with 30000 50000 75000) fsync = off checkpoint_segments = 10 (several tests with 20 - 30) checkpoint_timeout = 1000 (30-1800) stats_start_collector = off unfortunately, I can't use another disk for pg_xlog file. But I did not obtain a convincing result My program does some resquest quite simple. It does some UPDATE table set dat_update=current_date where id=XXXX ; And if not found id does some insert into table My sysadmin tells me write/read on hard disk aren't the pb (see with iostat) Have you got some idea to increase performance for my problem ? Thanks. Larry.