Skip site navigation (1) Skip section navigation (2)

Re: Packet sizes on transfers between client/server

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: "Walker, Jed S" <Jed_Walker(at)cable(dot)comcast(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Packet sizes on transfers between client/server
Date: 2005-08-26 17:09:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Fri, Aug 26, 2005 at 10:02:55AM -0600, Walker, Jed S wrote:
> We are needing to cut-down network traffic between our PostgreSQL client
> and server. The network team says that PostgreSQL is transferring data
> in 256k packets with acks of around half that size. Is there a parameter
> or a connection string setting that can be changed to force the system
> to use larger packet sizes?

Are you sure those packet size figures are correct?  What link layer
are you using that allows 256k packet sizes?  Might the size be 256
instead of 256k?  And what ACKs are they talking about?  In a TCP
connection, *all* segments except the first have the ACK flag set,
and many of those segments will be carrying data.  ACKs carrying
no data should be small -- just big enough for the IP and TCP headers
(20 bytes + 20 bytes + 0 or more bytes for IP and/or TCP options;
network engineers might also be adding link-layer framing) -- and
the operating system determines when to send those.

If I'm reading the source correctly, PostgreSQL sends data in
8192-byte chunks, but how those writes are broken up or aggregated
into link-layer packets is up to the operating system.  If you're
seeing a lot of packets smaller than the link layer's MTU then I'd
guess the application is doing a lot of small queries.  If that's
the case, then maybe some of that work could be moved into server-side

Have you run a sniffer (tcpdump, ethereal, etc.) to verify what the
network team is telling you?  If so then it might be useful to see
some of that data.

Michael Fuhr

In response to


pgsql-novice by date

Next:From: Walker, Jed SDate: 2005-08-26 17:41:51
Subject: Re: Packet sizes on transfers between client/server
Previous:From: operationsengineer1Date: 2005-08-26 17:08:28
Subject: Re: Copy Failure

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group