pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: shm_mq: Have the receiver set the sender's less frequently.
Date: Fri, 02 Mar 2018 17:21:33 +0000
Message-ID: <E1eroNB-0003sh-Ds@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1eroNB-0003sh-Ds@gemulon.postgresql.org>
Permalink:  ../E1eroNB-0003sh-Ds@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1eroNB-0003sh-Ds@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rhaas@postgresql.org
  Subject: Re: pgsql: shm_mq: Have the receiver set the sender's less frequently.
  In-Reply-To: <E1eroNB-0003sh-Ds@gemulon.postgresql.org>
  References: <E1eroNB-0003sh-Ds@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox