Skip to content

Disable Nagle's algorithm on tunnel tcp socket (TCP_NODELAY)#246

Open
alex3d wants to merge 1 commit intopahaz:masterfrom
alex3d:nodelay
Open

Disable Nagle's algorithm on tunnel tcp socket (TCP_NODELAY)#246
alex3d wants to merge 1 commit intopahaz:masterfrom
alex3d:nodelay

Conversation

@alex3d
Copy link
Copy Markdown
Contributor

@alex3d alex3d commented Oct 20, 2021

Disable Nagle's algorithm on tunnel tcp socket to prevent stalls on chatty protocols (for example keepalive'd http requests).

Without this patch (2kb.dat is 2 KBytes of random data):

$ python3 ./sshtunnel.py -U user -P password -L :8081 -R 127.0.0.1:80 -p 22 host
$ time curl -s `for _ in {1..25}; do echo 'http://127.0.0.1:8081/2kb.dat -o /dev/null'; done`
real    0m0,948s

With this patch:

$ time curl -s `for _ in {1..25}; do echo 'http://127.0.0.1:8081/2kb.dat -o /dev/null'; done`
real    0m0,040s

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