Re: When do vacuumed pages/tuples become available for reuse?

From: rihad <rihad(at)mail(dot)ru>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: When do vacuumed pages/tuples become available for reuse?
Date: 2019-04-11 15:14:06
Message-ID: 116d6b82-5bfc-ad43-6aab-d165b4b7da85@mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 04/11/2019 07:04 PM, Alvaro Herrera wrote:
> On 2019-Apr-11, rihad wrote:
>
>> On 04/11/2019 06:41 PM, Alvaro Herrera wrote:
>>
>>> Perhaps it'd be better to vacuum this table much more often.
>>>
>> Each run took 5-6 hours, now it takes 2-3 hours after I've tweaked some
>> cost-based vacuum knobs.
> But how often does it run?
>
One after another. Enough n_dead_tuples accumulate in between runs to
easily trigger that.

autovacuum_vacuum_scale_factor = 0.01

utovacuum_vacuum_threshold = 50

which means to run autovac when 1% of table size + 50 rows have been
updated or deleted.

But we can't make each autovacuum run run faster )

Currently I lowered this from 20ms:

autovacuum_vacuum_cost_delay = 10ms

And increased this from 200:

autovacuum_vacuum_cost_limit = 400

to make it finish in 1 hour rather than 3 hours.

Anything more than that and we risk impacting the performance of user
queries.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2019-04-11 15:40:54 Re: When do vacuumed pages/tuples become available for reuse?
Previous Message Alvaro Herrera 2019-04-11 15:04:23 Re: When do vacuumed pages/tuples become available for reuse?