Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TCdlW-0001h8-Qy for pgsql-performance@postgresql.org; Fri, 14 Sep 2012 21:49:34 +0000 Received: from smtp.01.com ([199.36.142.181]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TCdlU-0005xQ-2C for pgsql-performance@postgresql.org; Fri, 14 Sep 2012 21:49:34 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 9F40639021F for ; Fri, 14 Sep 2012 16:49:30 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s1B0k5wSeO7J for ; Fri, 14 Sep 2012 16:49:30 -0500 (CDT) Received: from smtp.01.com (localhost.localdomain [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 7528F390235 for ; Fri, 14 Sep 2012 16:49:30 -0500 (CDT) Received: from Sidney-Stratton.local (70-36-143-92.dsl.dynamic.sonic.net [70.36.143.92]) by smtp-out-2.01.com (Postfix) with ESMTPSA id 402DC39021F for ; Fri, 14 Sep 2012 16:49:30 -0500 (CDT) Message-ID: <5053A66A.9040809@agliodbs.com> Date: Fri, 14 Sep 2012 14:49:30 -0700 From: Josh Berkus Organization: PostgreSQL Experts Inc. User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Setting autovacuum_vacuum_scale_factor to 0 a good idea ? References: In-Reply-To: X-Enigmail-Version: 1.4.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201209/73 X-Sequence-Number: 47819 > I am pondering about this... My thinking is that since *_scale_factor need > to be set manually for largish tables (>1M), why not > set autovacuum_vacuum_scale_factor and autovacuum_analyze_scale_factor, and > increase the value of autovacuum_vacuum_threshold to, say, 10000, and > autovacuum_analyze_threshold > to 2500 ? What do you think ? I really doubt you want to be vacuuming a large table every 10,000 rows. Or analyzing every 2500 rows, for that matter. These things aren't free, or we'd just do them constantly. Manipulating the analyze thresholds for a large table make sense; on tables of over 10m rows, I often lower autovacuum_analyze_scale_factor to 0.02 or 0.01, to get them analyzed a bit more often. But vacuuming them more often makes no sense. > Also, with systems handling 8k-10k tps and dedicated to a single database, > would there be any cons to decreasing autovacuum_naptime to say 15s, so > that the system perf is less spiky ? You might also want to consider more autovacuum workers. Although if you've set the thresholds as above, that's the reason autovacuum is always busy and not keeping up ... -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com