Reducing WaitEventSet syscall churn

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Reducing WaitEventSet syscall churn
Дата
Msg-id CA+hUKGJAC4Oqao=qforhNey20J8CiG2R=oBPqvfR0vOJrFysGw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Reducing WaitEventSet syscall churn  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
Hi,

Here are some patches to get rid of frequent system calls.

0001 changes all qualifying WaitLatch() calls to use a new function
WaitMyLatch() that reuses a common WaitEventSet.  That's for callers
that only want to wait for their own latch or an optional timeout,
with automatic exit-on-postmaster-death.

0002 changes condition_variable.c to use WaitMyLatch(), instead of its
own local thing like that.  Perhaps this makes up for the use of the
extra fd consumed by 0001.

0003 changes pgstat.c to use its own local reusable WaitEventSet.

To see what I'm talking about, try tracing a whole cluster with eg
strace/truss/dtruss -f postgres -D pgdata.  This applies to Linux
systems, or BSD/macOS systems with the nearby kqueue patch applied.
On systems that fall back to poll(), there aren't any setup/teardown
syscalls.

Вложения

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

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Physical replication slot advance is not persistent
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Rearranging ALTER TABLE to avoid multi-operations bugs