Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f6ABv-0005UV-I6 for pgsql-general@arkaria.postgresql.org; Wed, 11 Apr 2018 07:29:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f6ABu-0002ff-3R for pgsql-general@arkaria.postgresql.org; Wed, 11 Apr 2018 07:29:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f6ABt-0002fW-IA for pgsql-general@lists.postgresql.org; Wed, 11 Apr 2018 07:29:13 +0000 Received: from mx2.mailbox.org ([80.241.60.215]) by makus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f6ABq-0008ML-Vl for pgsql-general@lists.postgresql.org; Wed, 11 Apr 2018 07:29:12 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 1A11241083; Wed, 11 Apr 2018 09:29:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id qQL9IpHUA2je; Wed, 11 Apr 2018 09:29:07 +0200 (CEST) Message-ID: <1523431746.2428.19.camel@cybertec.at> Subject: Re: Planning to change autovacuum_vacuum_scale_factor value to zero. Please suggest me if any negative impact. From: Laurenz Albe To: Raghavendra Rao J S V , pgsql-general@lists.postgresql.org Date: Wed, 11 Apr 2018 09:29:06 +0200 In-Reply-To: References: Organization: Cybertec Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Raghavendra Rao J S V wrote: > We are using postgres 9.2 version on Centos operating system. We have around 1300+ tables. > We have following auto vacuum settings are enables. Still few of the tables which are always busy are not vacuumed. Due to that tables are bloating and observed few areas has performance degradation. > > autovacuum_max_workers = 6 > autovacuum_naptime = 15s > autovacuum_vacuum_threshold = 25 > autovacuum_analyze_threshold = 10 > autovacuum_vacuum_scale_factor = 0.1 > autovacuum_analyze_scale_factor = 0.05 > autovacuum_vacuum_cost_delay = 10ms > autovacuum_vacuum_cost_limit = 1000 > > To avoid the above problem, I am planning to make ' autovacuum_vacuum_scale_factor' value to zero and autovacuum_vacuum_threshold value to 150. Please suggest me does it have any negative impact. That's an excellent way to keep your database from functioning well. Rather, raise autovacuum_vacuum_cost_limit, or, more aggressively, set autovacuum_vacuum_cost_delay to 0. It is better to change the settings on individual busy tables than changing them globally. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com