X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 887B7DB531 for ; Mon, 31 Oct 2005 13:12:13 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 98978-03 for ; Mon, 31 Oct 2005 17:12:11 +0000 (GMT) Received: from tbmail.tradebot.com (Tradebot-Systems-1096753.cust-rtr.swbell.net [68.90.170.2]) by svr1.postgresql.org (Postfix) with ESMTP id E9601DB4FF for ; Mon, 31 Oct 2005 13:12:08 -0400 (AST) Received: from 192.168.200.29 ([192.168.200.29]) by tbmail.tradebot.com ([192.168.1.50]) with Microsoft Exchange Server HTTP-DAV ; Mon, 31 Oct 2005 17:12:05 +0000 Received: from krb06 by TBMAIL; 31 Oct 2005 11:12:05 -0600 Subject: 8.x index insert performance From: Kelly Burkhart To: pgsql-performance@postgresql.org Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Mon, 31 Oct 2005 11:12:05 -0600 Message-Id: <1130778725.7026.33.camel@krb06.tradebot.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.026 required=5 tests=[AWL=0.025, UNPARSEABLE_RELAY=0.001] X-Spam-Score: 0.026 X-Spam-Level: X-Archive-Number: 200510/472 X-Sequence-Number: 15240 Greetings, We are running some performance tests in which we are attempting to insert about 100,000,000 rows in a database at a sustained rate. About 50M rows in, our performance drops dramatically. This test is with data that we believe to be close to what we will encounter in production. However in tests with purely generated, sequential data, we did not notice this slowdown. I'm trying to figure out what patterns in the "real" data may be causing us problems. I have log,data and indexes on separate LUNs on an EMC SAN. Prior to slowdown, each partition is writing at a consistent rate. Index partition is reading at a much lower rate. At the time of slowdown, index partition read rate increases, all write rates decrease. CPU utilization drops. The server is doing nothing aside from running the DB. It is a dual opteron (dual core, looks like 4 cpus) with 4GB RAM. shared_buffers = 32768. fsync = off. Postgres version is 8.1.b4. OS is SuSE Enterprise server 9. My leading hypothesis is that one indexed column may be leading to our issue. The column in question is a varchar(12) column which is non-null in about 2% of the rows. The value of this column is 5 characters which are the same for every row, followed by a 7 character zero filled base 36 integer. Thus, every value of this field will be exactly 12 bytes long, and will be substantially the same down to the last bytes. Could this pattern be pessimal for a postgresql btree index? I'm running a test now to see if I can verify, but my runs take quite a long time... If this sounds like an unlikely culprit how can I go about tracking down the issue? Thanks, -K