Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id A928C9FA1AA for ; Fri, 24 Aug 2007 18:39:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 62502-09 for ; Fri, 24 Aug 2007 18:39:24 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id A5EFF9F9D2C for ; Fri, 24 Aug 2007 18:39:24 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l7OLdMRU006074; Fri, 24 Aug 2007 17:39:22 -0400 (EDT) To: Kevin Kempter cc: "Pgsql performance" Subject: Re: significant vacuum issues - looking for suggestions In-reply-to: <200708241357.23629.kevin@kevinkempterllc.com> References: <200708241357.23629.kevin@kevinkempterllc.com> Comments: In-reply-to Kevin Kempter message dated "Fri, 24 Aug 2007 13:57:23 -0600" Date: Fri, 24 Aug 2007 17:39:22 -0400 Message-ID: <6073.1187991562@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/297 X-Sequence-Number: 26427 Kevin Kempter writes: > The development folks that have been here awhile tell me that it seems like > when they have a query (not limited to vacuum processes) that has been > running for a long time (i.e. > 5 or 6 hours) that the query sort of "goes > crazy" and the entire system gets pegged until they kill that > process. - I've not heard of this Me either, but I wonder whether their queries are tickling some memory leak. I could imagine that what they are seeing is the backend process growing slowly until it starts to swap, and then continuing to grow and needing more and more swap activity. Once you get over the knee of that curve, things get real bad real fast. It might not be a bad idea to run the postmaster under a (carefully chosen) ulimit setting to cut such things off before the system starts swapping. Other things to look at: * what exactly gets "pegged" --- is it CPU or I/O bound? Watching "vmstat 1" is usually a good diagnostic since you can see CPU, swap, and regular disk I/O activity at once. * is there really not any pattern to the queries that cause the problem? I don't think 8.1.4 has any widespread leakage problem, but they might be tickling something isolated, in which case 8.2 is not necessarily gonna fix it. If you can produce a test case showing this behavior it'd be time to call in pgsql-hackers. Your other points seem pretty well covered by other replies. regards, tom lane