X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3FBB452AEB for ; Mon, 18 Jul 2005 02:09:02 -0300 (ADT) 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 87060-02 for ; Mon, 18 Jul 2005 05:08:58 +0000 (GMT) Received: from mail22.sea5.speakeasy.net (mail22.sea5.speakeasy.net [69.17.117.24]) by svr1.postgresql.org (Postfix) with ESMTP id A923D52831 for ; Mon, 18 Jul 2005 02:08:56 -0300 (ADT) Received: (qmail 30001 invoked from network); 18 Jul 2005 05:08:56 -0000 Received: from dsl081-060-184.sfo1.dsl.speakeasy.net (HELO noodles) ([64.81.60.184]) (envelope-sender ) by mail22.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 18 Jul 2005 05:08:56 -0000 Received: from jwb by noodles with local (Exim 3.36 #1 (Debian)) id 1DuNsO-0002sS-00; Sun, 17 Jul 2005 22:09:12 -0700 Subject: Re: Huge performance problem between 7.4.1 and 8.0.3 - From: "Jeffrey W. Baker" To: Robert Creager Cc: PGPerformance , Andy Hewitt In-Reply-To: <20050717213416.59dcb52e@thunder.logicalchaos.org> References: <20050717213416.59dcb52e@thunder.logicalchaos.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Sun, 17 Jul 2005 22:09:11 -0700 Message-Id: <1121663351.10108.1.camel@noodles> Mime-Version: 1.0 X-Mailer: Evolution 2.3.5.1 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200507/249 X-Sequence-Number: 13490 On Sun, 2005-07-17 at 21:34 -0600, Robert Creager wrote: > Sigh... > > I recently upgraded from 7.4.1 to 8.0.3. The application did not change. I'm > now running both database concurrently (on different ports, same machine) just > so I could verify the problem really exists. > > The application is a custom test application for testing mechanical systems. > The runs in question (4 at a time) each generate 16 queries at a time of which > the results are sent to the mechanical system which processes the request, which > processes them anywhere from 10 to 120 seconds. The system is capable of > completing between 4 and 8 jobs at once. So, once the system is running, at > most there will be 8 queries per run simultaneously. > > The entire database fits into RAM (2Gb), as evidenced by no disk activity and > relatively small database size. pg_xlog is on different disks from the db. > > The problem is that on version 8.0.3, once I get 3 or more concurrent runs > going, the query times start tanking (>20 seconds). On 7.4.1, the applications > hum along with queries typically below .2 seconds on over 5 concurrent runs. > Needless to say, 7.4.1 behaves as expected... The only change between runs is > the port connecting to. Bot DB's are up at the same time. > > For 8.03, pg_autovacuum is running. On 7.4.1, I set up a cron job to vacuum > analyze every 5 minutes. > > The system is Mandrake Linux running 2.4.22 kernel with dual Intel Xenon CPU > with HT enabled. On an 803 run, the context switching is up around 60k. On > 7.4.1, it maxes around 23k and averages < 1k. Did you build 8.0.3 yourself, or install it from packages? I've seen in the past where pg would build with the wrong kind of mutexes on some machines, and that would send the CS through the roof. If you did build it yourself, check your ./configure logs. If not, try strace. -jwb