Re: Why does backend send buffer size hardcoded at 8KB? - Mailing list pgsql-general

From Peter J. Holzer
Subject Re: Why does backend send buffer size hardcoded at 8KB?
Date
Msg-id 20190728202141.GA25242@hjp.at
Whole thread Raw
In response to Re: Why does backend send buffer size hardcoded at 8KB?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On 2019-07-27 19:10:22 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > On 2019-07-27 18:34:50 -0400, Tom Lane wrote:
> >> Yeah.  The existing commentary about that is basically justifying 8K
> >> as being large enough to avoid performance issues; if somebody can
> >> show that that's not true, I wouldn't have any hesitation about
> >> kicking it up.
>
> > You think that unnecessary fragmentation, which I did show, isn't good
> > enough? That does have cost on the network level, even if it possibly
> > doesn't show up that much in timing.
>
> I think it is worth doing some testing, rather than just blindly changing
> buffer size, because we don't know how much we'd have to change it to
> have any useful effect.

I did a little test with nttcp between two of our servers (1 Gbit to
different switches, switches connected by 10 Gbit). The difference
between a 1024 byte buffer and a 1460 byte buffer is small but
measurable. Anything larger doesn't make a difference. So increasing the
buffer beyond 8 kB probably doesn't improve performance on a 1 Gbit LAN.

I didn't test 10 Gbit LAN or WAN - those might be different.

        hp

--
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp@hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>

Attachment

pgsql-general by date:

Previous
From: wambacher@posteo.de
Date:
Subject: Re: logging "raise" to file
Next
From: "Peter J. Holzer"
Date:
Subject: Re: Tablespace column value null on select * from pg_tables