Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 6AFC29FB21E for ; Mon, 23 Oct 2006 05:45:44 -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 51568-06 for ; Mon, 23 Oct 2006 05:45:27 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id DB2619FA333 for ; Mon, 23 Oct 2006 05:45:26 -0300 (ADT) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id A737B75826; Mon, 23 Oct 2006 09:45:24 +0100 (BST) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 66F3F2DD3B; Mon, 23 Oct 2006 09:45:24 +0100 (BST) Message-ID: <453C8147.60609@archonet.com> Date: Mon, 23 Oct 2006 09:45:59 +0100 From: Richard Huxton User-Agent: Thunderbird 1.5.0.7 (X11/20060909) MIME-Version: 1.0 To: Mike Cc: pgsql-performance@postgresql.org Subject: Re: Vacuum and Memory Loss References: <1161307454.955144.107400@m73g2000cwd.googlegroups.com> In-Reply-To: <1161307454.955144.107400@m73g2000cwd.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.331 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, SPF_HELO_SOFTFAIL, SPF_SOFTFAIL X-Spam-Level: ** X-Archive-Number: 200610/471 X-Sequence-Number: 21600 Mike wrote: > Hello friends, > > I am responsible for maintaining a high volume website using postgresql > 8.1.4. Given the amount of reads and writes, I vacuum full the server a > few times a week around 1, 2 AM shutting down the site for a few > minutes. The next day morning around 10 - 11 AM the server slows down > to death. It used to be that the error 'Too many clients' would be > recorded, until I increased the number of clients it can handle, and > now it simply slows down to death having lots and lots of postmaster > processes running: > > Tasks: 665 total, 10 running, 655 sleeping, 0 stopped, 0 zombie > Cpu(s): 14.9% us, 16.7% sy, 0.0% ni, 0.0% id, 68.4% wa, 0.0% hi, > 0.0% si > Mem: 2074932k total, 2051572k used, 23360k free, 2736k > buffers > Swap: 2096440k total, 1844448k used, 251992k free, 102968k cached This seems to be saying you have 1.8GB of swap in use. I'd start by checking with vmstat whether you're actively swapping. If so, you're overallocating memory. -- Richard Huxton Archonet Ltd