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

Suggestion - Disable Nagle's Algortihim by default #200

joshuaeb09 opened this Issue Oct 28, 2018 · 4 comments


None yet
2 participants

joshuaeb09 commented Oct 28, 2018

Expected Behavior

Shadowsocks should handle smaller than full MSS packets without much delay.

Actual Behavior

Interactive applications such as websockets or small UDP packets via shadowsocks suffer impaired performance under default configuration. Additionally it slows down certain TLS processes noticeably.

Steps to Reproduce the Problem

Deploy with defaults and then attempt to use highly interactive applications with small packet sizes via shadowsocks.


Use --no-delay to disable nagle on both server side and router for shadowsocks as nagle is typically of no or negative benefit on modern networks.


  • OpenMPTCProuter version: 0.39.3
  • OpenMPTCProuter VPS version: 0.58
  • OpenMPTCProuter platform: X86

I would advise killing nagle in the default configuration as it is troublesome with most modern applications. At work it causes numerous issues for customers and we typically kill it 99% of the time when an ADC is front-ending web-traffic as most of the lower cost ADC's do not intelligently disable it when required. It's most noticeable impact can be seen in TLS and general web-browsing functions that pretty much every user will encounter. This dated, but still very valid publication from NYU explains it as it would impact most end users.


This comment has been minimized.


Ysurac commented Oct 29, 2018

True, I can't remember why I didn't enabled no-delay setting... I will test it, and if no problem this will be enabled in next release by default.


This comment has been minimized.

joshuaeb09 commented Nov 1, 2018

Did you run into any issues with nagle off ? I noticed VPS .60 was out and after upgrade I had to re-patch my systemd file to re-disabled nagle on the server-side.

< OpenMPCTProuter VPS 0.60 >

Pre-Patch :
root@mptcp-server:~# cat /lib/systemd/system/shadowsocks-libev-server@.service | grep ss-server
ExecStart=/usr/bin/ss-server -c /etc/shadowsocks-libev/%i.json

root@mptcp-server:~# ps aux | grep shadow
root 26384 0.0 0.0 24668 1548 ? Ss 00:52 0:00 /usr/bin/ss-server -c /etc/shadowsocks-libev/config.json
root 26392 0.0 0.0 24668 1412 ? Ss 00:52 0:00 /usr/bin/ss-server -c /etc/shadowsocks-libev/config2.json
root 27940 0.0 0.0 12788 1016 pts/2 S+ 00:59 0:00 grep shadow

Post Patch :
root@mptcp-server:~# cat /lib/systemd/system/shadowsocks-libev-server@.service | grep ss-se
ExecStart=/usr/bin/ss-server -c /etc/shadowsocks-libev/%i.json --no-delay

root@mptcp-server:~# ps aux | grep ss-server
root 656 0.0 0.0 24668 1376 ? Ss 01:05 0:00 /usr/bin/ss-server -c /etc/shadowsocks-libev/config.json --no-delay
root 658 0.0 0.0 24668 1408 ? Ss 01:05 0:00 /usr/bin/ss-server -c /etc/shadowsocks-libev/config2.json --no-delay
root 1391 0.0 0.0 12788 944 pts/0 S+ 01:05 0:00 grep ss-server


This comment has been minimized.


Ysurac commented Nov 1, 2018

I added it in json config but this config is not updated, it's added on command line in OpenMPTCProuter VPS script 0.61 :)


This comment has been minimized.

joshuaeb09 commented Nov 1, 2018

Awesome. I just created a new test instance and I see it there by default now. Going to go ahead and close this.

@joshuaeb09 joshuaeb09 closed this Nov 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment