From: | Robert Haas <rhaas(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: shm_mq: Have the receiver set the sender's less frequently. |
Date: | 2018-03-02 17:21:33 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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.
Branch
------
master
Modified Files
--------------
src/backend/storage/ipc/shm_mq.c | 70 +++++++++++++++++++++++++---------------
1 file changed, 44 insertions(+), 26 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2018-03-02 18:19:18 | pgsql: postgres_fdw: Fourth attempt to stabilize regression tests. |
Previous Message | Robert Haas | 2018-03-02 17:19:58 | pgsql: shm_mq: Reduce spinlock usage. |