Re: autovacuum_work_mem

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: autovacuum_work_mem
Дата
Msg-id 20131213184006.GE12902@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: autovacuum_work_mem  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Ответы Re: autovacuum_work_mem
Список pgsql-hackers
Heikki Linnakangas escribió:

> I haven't been following this thread in detail, but would it help if
> we implemented a scheme to reduce (auto)vacuum's memory usage? Such
> schemes have been discussed in the past, packing the list of dead
> items more tightly.

Well, it would help some, but it wouldn't eliminate the problem
completely.  Autovacuum scales its memory usage based on the size of the
table.  There will always be a table so gigantic that a maximum
allocated memory is to be expected; and DBAs will need a way to limit
the memory consumption even if we pack dead items more densely.

I was playing with keeping item pointers for each page in a bitmapset.
This was pretty neat and used a lot less memory than currently, except
that I needed to allocate a large chunk of memory and then have
bitmapsets use words within that large allocation space.  It turned out
to be too ugly so I abandoned it.  With the "varbit encoding" thingy in
the recent GIN patchset, maybe it would be workable.

I think a more dense packing is desired regardless of this patch.
Maybe we can have a generic module for "item pointer arrays" which could
be useful for both autovacuum and GIN.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: "stuck spinlock"
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Extension Templates S03E11