autovacuum maintenance_work_mem

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема autovacuum maintenance_work_mem
Дата
Msg-id 1289923546-sup-4272@alvh.no-ip.org
обсуждение исходный текст
Ответы Re: autovacuum maintenance_work_mem  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Re: autovacuum maintenance_work_mem  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Re: autovacuum maintenance_work_mem  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Magnus was just talking to me about having a better way of controlling
memory usage on autovacuum.  Instead of each worker using up to
maintenance_work_mem, which ends up as a disaster when DBA A sets to a
large value and DBA B raises autovacuum_max_workers, we could simply
have an "autovacuum_maintenance_memory" setting (name TBD), that defines
the maximum amount of memory that autovacuum is going to use regardless
of the number of workers.

So for the initial implementation, we could just have each worker set
its local maintenance_work_mem to autovacuum_maintenance_memory / max_workers.
That way there's never excessive memory usage.

This implementation is not ideal, because most of the time they wouldn't
use that much memory, and so vacuums could be slower.  But I think it's
better than what we currently have.

Thoughts?

(A future implementation could improve things by using something like
the balancing code we have for cost_delay.  But I don't want to go there
now.)

-- 
Álvaro Herrera <alvherre@alvh.no-ip.org>


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: B-tree parent pointer and checkpoints
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: GCC vs clang