Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process: disable Nagle on Windows #4707

Merged
merged 1 commit into from
Feb 24, 2023
Merged

Process: disable Nagle on Windows #4707

merged 1 commit into from
Feb 24, 2023

Conversation

compnerd
Copy link
Member

Windows does not have a native socketpair interface and so we emulate that locally. Furthermore, the use of socketpair on the other platforms uses an AF_UNIX (Unix Domain Socket) which is not guaranteed to be available on Windows. As a result, we workaround that by using an AF_INET address family socket. This will by default have Nagle enabled which can potentially cause some delays when processing a message. We have observed occasional hangs in the process handling which may be possibly be attributed to the buffering. Disable nagle on the sender side in the hopes of a more reliable connection.

Windows does not have a native `socketpair` interface and so we emulate
that locally.  Furthermore, the use of `socketpair` on the other
platforms uses an `AF_UNIX` (Unix Domain Socket) which is not guaranteed
to be available on Windows.  As a result, we workaround that by using an
`AF_INET` address family socket.  This will by default have Nagle
enabled which can potentially cause some delays when processing a
message.  We have observed occasional hangs in the process handling
which may be possibly be attributed to the buffering.  Disable nagle on
the sender side in the hopes of a more reliable connection.
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

CC: @pcbeard

@compnerd
Copy link
Member Author

CC: @parkera

@compnerd compnerd merged commit 6e3a6ac into swiftlang:main Feb 24, 2023
@compnerd compnerd deleted the nagle branch February 24, 2023 18:19
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