From: Andres Freund <andres@anarazel.de>
To: rony.kurniawan@oracle.com
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17005: Enhancement request: Improve walsender throughput by aggregating multiple messages in one send
Date: Sun, 16 May 2021 15:44:13 -0700
Message-ID: <20210516224413.xitbilinlyrlt42m@alap3.anarazel.de> (raw)
In-Reply-To: <17005-3e1030784d5440c4@postgresql.org>
References: <17005-3e1030784d5440c4@postgresql.org>
Hi,
On 2021-05-13 00:31:53 +0000, PG Bug reporting form wrote:
> I measured the throughput of reading the logical replication slot and found
> that in smaller row size (512 bytes) the throughput is 50% lower compared to
> 1024 bytes.
Huh, that is interesting.
> tcpdump shows that ethernet packets sent by the replication server contain
> only one message per packet (see tcpdump output below).
> May be this is the intended design to achieve low latency but this is not
> favorable in application that requires high throughput.
What kind of network is this? I would have expected that if the network
can't keep up the small sends would end up getting aggregated into
larger packets anyway? Are you hitting a PPS limit due to the small
packages, but not yet the throughput limit?
> Is it possible for PostgreSQL to enable Nagle's algorithm on the streaming
> socket for replication?
> Or aggegate the messages manually before sending them in one send()?
I think we can probably do better in cases a transaction is more than a
single change - but I don't think either enabling nagle's or aggregation
are really an option in case of single row transactions. The latency
impact for some scenarios seems too high.
Greetings,
Andres Freund
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-bugs@postgresql.org
Cc: andres@anarazel.de, rony.kurniawan@oracle.com
Subject: Re: BUG #17005: Enhancement request: Improve walsender throughput by aggregating multiple messages in one send
In-Reply-To: <20210516224413.xitbilinlyrlt42m@alap3.anarazel.de>
References: <17005-3e1030784d5440c4@postgresql.org> <20210516224413.xitbilinlyrlt42m@alap3.anarazel.de>
* 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