Re: track_planning causing performance regression

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: track_planning causing performance regression
Дата
Msg-id 20200629231015.qlej5b3qpfe4uijo@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: track_planning causing performance regression  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Список pgsql-hackers
Hi,

On 2020-06-29 17:55:28 +0900, Fujii Masao wrote:
> One idea to reduce that lock contention is to separate per-query spinlock
> into two; one is for planning, and the other is for execution. pgss_store()
> determines which lock to use based on the given "kind" argument.
> To make this idea work, also every pgss counters like shared_blks_hit
> need to be separated into two, i.e., for planning and execution.

I suspect that the best thing would be to just turn the spinlock into an
lwlock. Spinlocks deal terribly with contention. I suspect it'd solve
the performance issue entirely. And it might even be possible, further
down the line, to just use a shared lock, and use atomics for the
counters.

Greetings,

Andres Freund



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: track_planning causing performance regression
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: pgstattuple: Have pgstattuple_approx accept TOAST tables