Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem
Дата
Msg-id 20170123160601.j7xgx7lccpldasb4@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
I pushed this patch after rewriting it rather completely.  I added
tracing notices to inspect the blocks it was prefetching and observed
that the original coding was failing to prefetch the final streak of
blocks in the table, which is an important oversight considering that it
may very well be that those are the only blocks to read at all.

I timed vacuuming a 4000-block table in my laptop (single SSD disk;
dropped FS caches after deleting all rows in table, so that vacuum has
to read all blocks from disk); it changes from 387ms without patch to
155ms with patch.  I didn't measure how much it takes to run the other
steps in the vacuum, but it's clear that the speedup for the truncation
phase is considerable.

¡Thanks, Claudio!

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



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

Предыдущее
От: Kuntal Ghosh
Дата:
Сообщение: Re: [HACKERS] Add pgstathashindex() to get hash index table statistics.
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem