is there any adverse effect on DB if I set autovacuum scale factor to zero?

From: Raghavendra Rao J S V <raghavendrajsv(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: is there any adverse effect on DB if I set autovacuum scale factor to zero?
Date: 2018-08-13 09:07:13
Message-ID: CAEHH7R66M1tqPMveLwq1njcE0A2zvBVUjnUARXCMhF-rQBfuKQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,

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(84 tables) which are always busy are not
vacuumed.Dead tuples in those tables are more than 5000. Due to that
tables are bloating and observed few areas has performance degradation.

autovacuum = on
log_autovacuum_min_duration = 100
autovacuum_max_workers = 5
autovacuum_naptime = 1min
autovacuum_vacuum_threshold = 40
autovacuum_analyze_threshold = 20
autovacuum_vacuum_scale_factor = 0.1
autovacuum_analyze_scale_factor = 0.05
autovacuum_freeze_max_age = 200000000
autovacuum_vacuum_cost_delay = 30ms
autovacuum_vacuum_cost_limit = 1200
# - Cost-Based Vacuum Delay -

#vacuum_cost_delay = 0ms # 0-100 milliseconds
#vacuum_cost_page_hit = 1 # 0-10000 credits
#vacuum_cost_page_miss = 10 # 0-10000 credits
#vacuum_cost_page_dirty = 20 # 0-10000 credits
vacuum_cost_limit = 200 # 1-10000 credits

In order to avoid the table bloating and performance degradation,we would
like to set the* ' autovacuum_vacuum_scale_factor'(zero) * and
*'autovacuum_vacuum_threshold
' (200)* settings for the busy tables as below. Please let me know is there
any adverse effect on DB if I set autovacuum scale factor to zero for
certain tables. If yes, what is the effect and how to test.

ALTER TABLE cmdevice SET (autovacuum_vacuum_scale_factor = 0,
autovacuum_vacuum_threshold = 200);

Kindly let me know the role of *autovacuum_vacuum_cost_delay* and
*autovacuum_vacuum_cost_limit* settings .

Regards,
Raghavendra Rao

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sachin Kotwal 2018-08-13 09:13:25 Re: Query: Migrating from SQLServer to Postgresql
Previous Message Darnie Graceline 2018-08-13 07:24:07 Query: Migrating from SQLServer to Postgresql