Skip to content

add TCP No Delay option fixes Issue #2324#2341

Merged
davecramer merged 1 commit intopgjdbc:masterfrom
davecramer:tcpnodelay
Nov 16, 2021
Merged

add TCP No Delay option fixes Issue #2324#2341
davecramer merged 1 commit intopgjdbc:masterfrom
davecramer:tcpnodelay

Conversation

@davecramer
Copy link
Copy Markdown
Member

No description provided.

@davecramer davecramer merged commit 2a8ecbe into pgjdbc:master Nov 16, 2021
obourgain added a commit to obourgain/pgjdbc that referenced this pull request Apr 20, 2022
In [pgjdbc#2341](pgjdbc#2341) the option to
configure tcpNoDelay was added, with a default value of false.

The previous value of this setting was true, as set in
PGStream.changeSocket(Socket) with the following code:
```
    // Submitted by Jason Venner <[email protected]>. Disable Nagle
    // as we are selective about flushing output only when we
    // really need to.
    connection.setTcpNoDelay(true);
```

`changeSocket()` is called from the `PGStream` constructor, which is
called in `ConnectionFactoryImpl`, and then later we overwrite the value
with the one from the properties.

We had a performance issue when upgrading from 42.2.24 to 42.3.3, and we suspected the
issue in 42.3.2 and confirmed that by passing the property `tcpNoDelay=true` to the driver,
the performance issue was fixed.
davecramer pushed a commit that referenced this pull request Apr 21, 2022
In [#2341](#2341) the option to
configure tcpNoDelay was added, with a default value of false.

The previous value of this setting was true, as set in
PGStream.changeSocket(Socket) with the following code:
```
    // Submitted by Jason Venner <[email protected]>. Disable Nagle
    // as we are selective about flushing output only when we
    // really need to.
    connection.setTcpNoDelay(true);
```

`changeSocket()` is called from the `PGStream` constructor, which is
called in `ConnectionFactoryImpl`, and then later we overwrite the value
with the one from the properties.

We had a performance issue when upgrading from 42.2.24 to 42.3.3, and we suspected the
issue in 42.3.2 and confirmed that by passing the property `tcpNoDelay=true` to the driver,
the performance issue was fixed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant