Re: Configurable Send/Receive Buffer Sizes

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: Configurable Send/Receive Buffer Sizes
Дата
Msg-id CADK3HHJ9TCQNxoTX24KHrkkvwaGuBvhwXp3hy4i+E1XfDomEgA@mail.gmail.com
обсуждение исходный текст
Ответ на Configurable Send/Receive Buffer Sizes  (Bernd Helmle <mailings@oopsware.de>)
Список pgsql-jdbc
Is there any objection to this patch ?

Otherwise I will look at committing it .

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca




On Thu, Apr 21, 2011 at 10:42 AM, Bernd Helmle <mailings@oopsware.de> wrote:
> Folks,
>
> please find attached a patch which allows to specify the size of TCP
> send/receive buffers (SO_SNDBUF/SO_RECVBUF socket options) in the JDBC
> driver.
>
> The patch adds two connection parameters to the JDBC driver:
>
> send_buffer_size: Specifes the size of the TCP write buffer used with the
> connection
>
> receive_buffer_size: Specifies the size of the TCP read buffer used with the
> connection
>
> For example:
>
> Connection conn =
>
DriverManager.getConnection("jdbc:postgresql://localhost:5432/bernd?loglevel=2&send_buffer_size=262144&receive_buffer_size=1048576",
> "bernd", "");
>
> It occured to me several times now where this functionality became useful,
> especially when working on migration projects in the past, where the
> application couldn't be changed immediately when doing large batch
> processing. An interesting example is the small test program from
>
> <http://archives.postgresql.org/pgsql-jdbc/2008-10/msg00045.php>
>
> which could be make working with the appropiate buffer settings.
>
> Maybe this is worth for discussion or even to investigate it further for
> inclusion.
>
> Note that on Linux you need to adjust the kernel maximum buffer sizes in
> /proc/sys/net/core/wmem_max and /proc/sys/net/core/rmem_max to become any
> settings effective. I have reports that this isn't necessary on Windows,
> however.  This certainly needs adequate documentation.
>
> I didn't invest any time on benchmarks, but maybe there's also some value in
> it performance-wise.
>
> --
> Thanks
>
>        Bernd
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>
>

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Alex Nordlund
Дата:
Сообщение: Re: Cannot create PoolableConnectionFactory (The connection attempt failed.)
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Cannot create PoolableConnectionFactory (The connection attempt failed.)