Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

Disable Nagle's alrogithm by default. #72

Merged
merged 1 commit into from
Jul 8, 2013
Merged

Conversation

fbernier
Copy link
Contributor

@fbernier fbernier commented Jul 7, 2013

For a webserver where requests/responses are usually large enough to be contained in a packet, the Nagle's algorithm slows the last packet sent.

This configuration is probably used in most ruby web servers. I only checked for Puma though.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0%) when pulling 11f4b7a on fbernier:master into 6732f22 on celluloid:master.

@fbernier
Copy link
Contributor Author

fbernier commented Jul 7, 2013

Looks like it's failing ... be right back.

@tarcieri
Copy link
Member

tarcieri commented Jul 8, 2013

If you can push again (perhaps edit a commit message and force push) it should trigger the build again

@coveralls
Copy link

Coverage Status

Coverage increased (+0%) when pulling 24a3fcf on fbernier:master into 6732f22 on celluloid:master.

@fbernier
Copy link
Contributor Author

fbernier commented Jul 8, 2013

@tarcieri
Copy link
Member

tarcieri commented Jul 8, 2013

Seems good, thanks!

tarcieri added a commit that referenced this pull request Jul 8, 2013
Disable Nagle's alrogithm by default.
@tarcieri tarcieri merged commit 341b23f into celluloid:master Jul 8, 2013
@digitalextremist
Copy link
Member

I've already been using that in my branch, however I also have these. Ought I push them into a pull request?

socket.setsockopt( Socket::IPPROTO_TCP, :TCP_NODELAY, 1 )
socket.setsockopt( Socket::IPPROTO_TCP, 3, 1 ) # TCP_CORK
socket.setsockopt( Socket::SOL_SOCKET, Socket::SO_REUSEADDR, 1 )

@tarcieri
Copy link
Member

tarcieri commented Jul 8, 2013

REUSEADDR would be good. I don't think that usage of TCP_CORK alone will work, though

@digitalextremist
Copy link
Member

Ok I will do that. TCP_CORK works with TCP_NODELAY but both or one of them are linux only so I trap by OS.

@tarcieri
Copy link
Member

tarcieri commented Jul 8, 2013

I don't get how TCP_CORK works if you're never uncorking

@digitalextremist
Copy link
Member

I believe 3 is UNCORK, I can find the actual man page for this to verify.

@tarcieri
Copy link
Member

tarcieri commented Jul 8, 2013

That doesn't help unless you've corked...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants