Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 16FAEB5DBC6 for ; Sat, 9 Jul 2011 06:06:24 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 12379-07 for ; Sat, 9 Jul 2011 09:06:17 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd-17937.dedibox.fr (sd-17937.dedibox.fr [88.191.100.74]) by mail.postgresql.org (Postfix) with ESMTP id 9DF48B5DBC4 for ; Sat, 9 Jul 2011 06:06:17 -0300 (ADT) Received: from [192.168.10.3] (ASte-Genev-Bois-153-1-21-176.w83-112.abo.wanadoo.fr [83.112.201.176]) by sd-17937.dedibox.fr (Postfix) with ESMTPA id 0AE203B8F5; Sat, 9 Jul 2011 11:06:16 +0200 (CEST) Subject: Re: Memory usage of auto-vacuum From: Guillaume Lelarge To: Gael Le Mignot Cc: pgsql-performance@postgresql.org Date: Sat, 09 Jul 2011 11:06:16 +0200 In-Reply-To: References: <1310200383.2101.8.camel@laptop> <1310201594.2101.12.camel@laptop> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.2 (3.0.2-3.fc15) Content-Transfer-Encoding: 7bit Message-ID: <1310202377.2101.15.camel@laptop> Mime-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201107/60 X-Sequence-Number: 44272 On Sat, 2011-07-09 at 11:00 +0200, Gael Le Mignot wrote: > Hello Guillaume! > > Sat, 09 Jul 2011 10:53:14 +0200, you wrote: > > > I don't quite understand how you can get up to 1GB used by your process. > > According to your configuration, and unless I'm wrong, it shouldn't take > > more than 40MB. Perhaps a bit more, but not 1GB. So, how did you find > > this number? > > Looking at "top" we saw the postgres process growing and growing and > then shrinking back, and doing a "select * from pg_stat_activity;" in > parallel of the growing we found only the "vacuum analyze" query running. > There is not only one postgres process. So you first need to be sure that it's the one that executes the autovacuum. > But maybe we drawn the conclusion too quickly, I'll try disabling the > auto vacuum to see if we really get rid of the problem doing it. > Disabling the autovacuum is usually a bad idea. You'll have to execute VACUUM/ANALYZE via cron, which could get hard to configure. BTW, what's your PostgreSQL release? I assume at least 8.3 since you're using FTS? -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com