Re: cost delay brainstorming

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: cost delay brainstorming
Дата
Msg-id CAApHDvp1_fqwwQgVzXxco0adkiKi6=cYB65HPFB4LVh-wq=T_g@mail.gmail.com
обсуждение исходный текст
Ответ на cost delay brainstorming  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Tue, 18 Jun 2024 at 07:39, Robert Haas <robertmhaas@gmail.com> wrote:
> I think we might able to get fairly far by observing that if the
> number of running autovacuum workers is equal to the maximum allowable
> number of running autovacuum workers, that may be a sign of trouble,
> and the longer that situation persists, the more likely it is that
> we're in trouble. So, a very simple algorithm would be: If the maximum
> number of workers have been running continuously for more than, say,
> 10 minutes, assume we're falling behind and exempt all workers from
> the cost limit for as long as the situation persists. One could
> criticize this approach on the grounds that it causes a very sudden
> behavior change instead of, say, allowing the rate of vacuuming to
> gradually increase. I'm curious to know whether other people think
> that would be a problem.

I think a nicer solution would implement some sort of unified "urgency
level" and slowly ramp up the vacuum_cost_limit according to that
urgency rather than effectively switching to an infinite
vacuum_cost_limit when all workers have been going for N mins. If
there is nothing else that requires a vacuum while all 3 workers have
been busy for an hour or two, it seems strange to hurry them up so
they can more quickly start their next task -- being idle.

An additional feature that having this unified "urgency level" will
provide is the ability to prioritise auto-vacuum so that it works on
the most urgent tables first.

I outlined some ideas in [1] of how this might be done.

David

[1] https://postgr.es/m/CAApHDvo8DWyt4CWhF=NPeRstz_78SteEuuNDfYO7cjp=7YTK4g@mail.gmail.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Amonson, Paul D"
Дата:
Сообщение: RE: Proposal for Updating CRC32C with AVX-512 Algorithm.
Следующее
От: Chapman Flack
Дата:
Сообщение: Re: jsonpath: Missing regex_like && starts with Errors?