Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id A891C631AB8 for ; Fri, 16 Apr 2010 14:44:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 12742-01 for ; Fri, 16 Apr 2010 17:43:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qy0-f201.google.com (mail-qy0-f201.google.com [209.85.221.201]) by mail.postgresql.org (Postfix) with ESMTP id 0B1586344EA for ; Fri, 16 Apr 2010 14:43:53 -0300 (ADT) Received: by qyk39 with SMTP id 39so3310435qyk.24 for ; Fri, 16 Apr 2010 10:43:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:received:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=6x92ujXGF1EvPurLBqSvIJItvYfDn/jyLCTT4ZwACfQ=; b=dgg/9DxjBGqN7k2PTaKdlE99psBE7LVTBDOpkwPGE7MiWRbnXQn+JMTmuNGfxAY/L+ 1blafx3XC6LR/mDnGUMCX10/2yYMMgeW04noEzd+xdRIosjbNYLAaEh70HkEH6pslwJi lRQX1Tk1m9c53cQw33QNX/S44/GE804GO2pF8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=uWO47FkFZt1VohzmMm1r/e0KL/tqMQH58TDXzI3hQw5O7SSdkzVEh650s/BTKMfDdx KxB9Ai0fyQvoFr8fHpRUT2OQr9DiXm/oX6YWXhchwqcLjOmKnr6EOWEx/zvK/64qakg9 ZE2ErJZHoUPPTZQ60rQyY2+mHNaYoWTtVQ+bc= MIME-Version: 1.0 Received: by 10.229.88.3 with HTTP; Fri, 16 Apr 2010 10:43:17 -0700 (PDT) In-Reply-To: <11152.1271436528@sss.pgh.pa.us> References: <20100413170105.GA29571@chris-laptop.a2hosting.com> <25952.1271370711@sss.pgh.pa.us> <9738.1271431432@sss.pgh.pa.us> <10082.1271432484@sss.pgh.pa.us> <11152.1271436528@sss.pgh.pa.us> From: Josh Kupershmidt Date: Fri, 16 Apr 2010 13:43:17 -0400 Received: by 10.229.216.76 with SMTP id hh12mr2743885qcb.47.1271439832966; Fri, 16 Apr 2010 10:43:52 -0700 (PDT) Message-ID: Subject: Re: stats collector suddenly causing lots of IO To: Tom Lane Cc: Chris , pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001 X-Spam-Level: X-Archive-Number: 201004/221 X-Sequence-Number: 38471 On Fri, Apr 16, 2010 at 12:48 PM, Tom Lane wrote: > Josh Kupershmidt writes: >> Hrm, well autovacuum is at least trying to do work: it's currently >> stuck on those bloated pg_catalog tables, of course. Another developer >> killed an autovacuum of pg_attribute (or maybe it was pg_attrdef) >> after it had been running for two weeks. See current pg_stat_activity >> output attached, which shows the three autovacuum workers running plus >> two manual VACUUM ANALYZEs I started yesterday. > > Two weeks? =A0What have you got the autovacuum cost delays set to? SELECT name, current_setting(name), source FROM pg_settings WHERE source !=3D 'default' AND name ILIKE '%vacuum%'; name | current_setting | source ----------------------+-----------------+-------------------- vacuum_cost_delay | 200ms | configuration file vacuum_cost_limit | 100 | configuration file vacuum_cost_page_hit | 6 | configuration file (3 rows) I'm guessing these values and the default autovacuum configuration values need to be cranked significantly to make vacuum much more aggressive :-( > Once you're up to three AV workers, no new ones can get launched until > one of those finishes or is killed. =A0So that would explain failure to > prune the stats collector's tables (the tabpurge code is only run during > AV worker launch). =A0So what we need to figure out is why it's taking so > obscenely long to vacuum these tables ... > Hopefully changing those three vacuum_cost_* params will speed up the manual- and auto-vacuums.. it'll take me a few days to see any results, since I still need to do something about the bloat that's already there. Josh