Re: [HACKERS] [WIP] Zipfian distribution in pgbench

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [HACKERS] [WIP] Zipfian distribution in pgbench
Дата
Msg-id 20170712205542.3kvvitnrslww2jf5@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: [HACKERS] [WIP] Zipfian distribution in pgbench  (Peter Geoghegan <pg@bowt.ie>)
Ответы Re: [HACKERS] [WIP] Zipfian distribution in pgbench  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
Peter Geoghegan wrote:

> Now, that might not seem like that much of a difference, but if you
> consider how duplicates are handled in the B-Tree code, and how unique
> index enforcement works, I think it could be. It could lead to heavy
> buffer lock contention, because we sometimes do a lot of work with an
> exclusive buffer lock held.

Not to mention work done with a "buffer cleanup lock" held -- which is
compounded by the fact that acquiring such a lock is prone to starvation
if there are many scanners of that index.  I've seen a case where a very
hot table is scanned so heavily that vacuum is starved for days waiting
to acquire cleanup on a single page (vacuum was only able to finish
because the app using the table was restarted).  I'm sure that a uniform
distribution of keys, with a uniform distribution of values scanned,
would give a completely different behavior than a highly skewed
distribution where a single key receives a large fraction of the scans.

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



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

Предыдущее
От: Jeevan Ladhe
Дата:
Сообщение: Re: [HACKERS] Adding support for Default partition in partitioning
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] [WIP] Zipfian distribution in pgbench