Re: Why the size (PQ_BUFFER_SIZE) of backend send buffers is 8192 ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: xbzhang <xbzhang(at)kingbase(dot)com(dot)cn>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Why the size (PQ_BUFFER_SIZE) of backend send buffers is 8192 ?
Date: 2014-01-03 15:00:42
Message-ID: 9426.1388761242@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

xbzhang <xbzhang(at)kingbase(dot)com(dot)cn> writes:
> Why the size (PQ_BUFFER_SIZE) of backend send buffers is 8192 ?

Traditionally, at least, that was the size of pipe buffers in Unix
machines, so in principle this is the most optimal chunk size for
sending data across a Unix socket. I have no idea though if that's
still true in kernels in common use today. For TCP communication
it might be marginally better to find out the MTU size and use that;
but it's unclear that it's worth the trouble, or indeed that we can
know the end-to-end MTU size with any reliability.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-01-03 15:07:15 Re: authentication failure
Previous Message Adrian Klaver 2014-01-03 14:27:58 Re: authentication failure