Re: [HACKERS] SO_SNDBUF size is small on win32?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Yoshiyuki Asaba <y-asaba(at)sraoss(dot)co(dot)jp>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] SO_SNDBUF size is small on win32?
Date: 2006-08-11 20:44:23
Message-ID: 200608112044.k7BKiNr10009@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Yoshiyuki Asaba wrote:
> Hi,
>
> I see a performance issue on win32. This problem is causes by the
> following URL.
>
> http://support.microsoft.com/kb/823764/EN-US/
>
> On win32, default SO_SNDBUF value is 8192 bytes. And libpq's buffer is
> 8192 too.
>
> pqcomm.c:117
> #define PQ_BUFFER_SIZE 8192
>
> send() may take as long as 200ms. So, I think we should increase
> SO_SNDBUF to more than 8192. I attache the patch.

Based on this patch and comments, I have applied a patch that sets the
buffer to 32k, and adds the URL in a comment. I think there was
concensus that there is no need for this to be used on the client side,
only the server.

Thanks.

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/bjm/diff text/x-diff 937 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2006-08-11 21:02:25 Re: [HACKERS] Forcing current WAL file to be archived
Previous Message Ron Mayer 2006-08-11 20:36:42 Re: [HACKERS] Maintaining cluster order on insert

Browse pgsql-patches by date

  From Date Subject
Next Message Jim Nasby 2006-08-11 21:02:25 Re: [HACKERS] Forcing current WAL file to be archived
Previous Message Ron Mayer 2006-08-11 20:36:42 Re: [HACKERS] Maintaining cluster order on insert