pgsql: shm_mq: Have the receiver set the sender's less frequently.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема pgsql: shm_mq: Have the receiver set the sender's less frequently.
Дата
Msg-id E1eroNB-0003sh-Ds@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
shm_mq: Have the receiver set the sender's less frequently.

Instead of marking data from the ringer buffer consumed and setting the
sender's latch for every message, do it only when the amount of data we
can consume is at least 1/4 of the size of the ring buffer, or when no
data remains in the ring buffer.  This is dramatically faster in my
testing; apparently, the savings from sending signals less frequently
outweighs the benefit of letting the sender know about available buffer
space sooner.

Patch by me, reviewed by Andres Freund and tested by Rafia Sabih.

Discussion: http://postgr.es/m/CA+TgmoYK7RFj6r7KLEfSGtYZCi3zqTRhAz8mcsDbUAjEmLOZ3Q@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/497171d3e2aaeea3b30d710b4e368645ad07ae43

Modified Files
--------------
src/backend/storage/ipc/shm_mq.c | 70 +++++++++++++++++++++++++---------------
1 file changed, 44 insertions(+), 26 deletions(-)


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: pgsql: shm_mq: Reduce spinlock usage.
Следующее
От: Robert Haas
Дата:
Сообщение: pgsql: postgres_fdw: Fourth attempt to stabilize regression tests.