Enable ECN on multiple operating systems
Solaris
OSX
Linux
FreeBSD
notes to sort out:
[Tue Jun 21 2011]
What was the name of the bufferbloat-related sysctl parameter on
Linux?
ECN? I’m drawing a blank. [07:43]
?
Got your plug?
Up and running.
heh
net.ipv4.tcp_ecn [07:44]
That’s it.
http://www.bufferbloat.net/projects/bloat/wiki/Dogfood_Principle
I have it set to 2 which, as I recall, means “try ECN, but
fallback if it’s not there”
no, it’s worse than that
secondly this only applies to connections initiated from or to
the
router [07:45]
dsack, and sack are good too
But it should help with NAT’ed connections, no?
I just got a guruplug version of openwrt built, but debian is
WAY
easier to deal with.
no
proxied via something like polipo, yes [07:46]
Hmm. But the original problem you had here was that my
crappy
Linksys didn’t grok ECN at all, and you had ECN = 1 on your Linux
box. Right?
right [07:47]
your router was not passing through the ECN bits - dying
terribly.
Now you should be able to turn it on on the rest of your
internal gear
So, if my plug router groks ECN, and I enable ECN on it, I
gain …
what?
It’s a flow-control thing, isn’t it?
and have all the relative theoretical chocolaty goodness
yes
marking rather than dropping packets is a theoretical goodness
[07:48]
Right. So, bottom line, I want to enable it on the plug,
and
enable it (set to 2 or 1) on the various internal machines.
yes.
Interesting. Out of the box, the plug’s Debian has:
[07:49]
net.ipv4.tcp_sack = 1
net.ipv4.tcp_ecn =
2
net.ipv4.tcp_dsack = 1
that are the best defaults for yesterday’s internet. The new
hotness
is ecn
:)
The internal Ubuntu servers are similarly
configured.
yep
ECN breakage was a real problem
Yes, but, IIRC, ecn=2 is essentially ecn=1, with a fallback
to
oldness. [07:50]
in fact, we’ve fixed ECN, TOS, and Diffserv problems all over
the
Linux stack in the last month.
ummmm
Or did I misunderstand your original explanation?
Or I was drunk…
ecn = 0 entirely disabled
ecn = 1 enabled
Right. I got that.
What is ecn=2?
ecn = 2…
I think means accept it if presented but don’t initiate it…
Wait one
[07:51]
yea
Ah. So, ecn=2 on the router is fine, but I want ecn=1 on
the
internal client machines.
so ecn=1 is good, and a fallback, like ecn=3 - if it existed,
which
would have the desired fallback behavior would be good [07:52]
there’s a patch for that coming, I think
Sounds like I should leave the router at 2, in case there
are
internal machines (e.g., windows breakage) that don’t do ECN.
heh
I’m not aware of ecn=1 breaking on ANYTHING except your old
router. You were the first, the last, and the worst.
but whatever
I’m just trying to grok this stuff. [07:53]
I’ll try 1 on the router, see what happens.
it helps to have qos on the router that applies it to streams
that are
killing your life, rather than drops it… But that’s not a huge issue
for you as you have bandwidth to burn.
Man, this dream plug is sweet. Tiny, small footprint
(physical and
electrical), quiet as all fuck, and real *nix, to boot.
thx for tryin it. How does the ‘dreamplug’ feel? Is it a better
piece
of gear?
hahha
answered my question in advance [07:54]
Way better. I resurrected the GuruPlug, via the JTAG. Trying
to
decide whether I have a use for it.
Or whether I should give it to someone (e.g., Costine) and
spread
the love.
yea, I loved the openrd, but the interviening releases of
sheevaplug
and guruplug left me cold. I’m also not happy with the wireless chip,
but that’s relatively minor.
spread the love, man….
That’s what I’m thinking. … Okay, time for a conf call. By
then,
my kid should be awake and ready for waffles. [07:55]
BTW, the wireless is working just fine here.
I use rc.local to adjust the params via uapctl.
yea, well, start moving to the edge of the range and then watch
your
ping times….
Not an issue here.
- dtaht plans to get one of these puppies too, after bmc is happy for
a few
weeks.
I have four WAPs in this interference-laden place.
:-)
- dtaht is using diversity mesh routing now with babel [07:56]
babel + ahcpd is sweet
sit down, plug in the laptop
it figures out it’s on wired
Something to look into, when I have time. If I ever have
time
again.
unplug, it figures out you are on wireless
Niiiice.
streams, and connections, STAY UP
Very sweet.
Okay, time to make that call. Later.
yea, it’s amazing how freeing it is to be able to plug in
again.
later [07:57]
thx
also the mesh routing ‘diversity’ means that I have several
nodes that
route over 5.x ghz and are aps over 2.4, and vice versa… Connect
your neighbors
whenever you get time I wanted to know how that meeting
turned out.
[07:58]
What meeting? [08:00]
some users group meeting of all the users groups [08:07]
Right. I went to a lot of meetings last week. :-) That
went
well. We’re moving forward, trying to get common venues, common
calendars, etc. [08:10]
FYI, on Mac OS X: [08:12]
\$ sysctl -a | egrep
‘ecn|sack’
net.inet.tcp.ecn_initiate_out:
0
net.inet.tcp.ecn_negotiate_in: 0
net.inet.tcp.sack:
1
net.inet.tcp.sack_maxholes:
128
net.inet.tcp.sack_globalmaxholes:
65536
net.inet.tcp.sack_globalholes: 0
net.inet.ipsec.ecn:
0
net.inet6.ipsec6.ecn: 0
heh. THANK YOU [08:22]
- dtaht wanted a mesh network in philly to implement.
Another data point: (dancer:bmc) ~ \$ uname -s -r
FreeBSD
8.2-RELEASE
(dancer:bmc) ~ \$ sysctl -a | egrep
‘sack|ecn’
vfs.bufreusecnt: 932
net.inet.tcp.ecn.maxretries:
1
net.inet.tcp.ecn.enable: 0
net.inet.tcp.sack.globalholes:
0
net.inet.tcp.sack.globalmaxholes:
65536
net.inet.tcp.sack.maxholes:
128
net.inet.tcp.sack.enable:
1
net.inet.sctp.enable_sack_immediately: [08:48]
0
net.inet.sctp.nr_sack_on_off:
0
net.inet.sctp.sack_freq:
2
net.inet.sctp.delayed_sack_time:
200
net.inet.sctp.strict_sacks:
1
net.inet.sctp.ecn_nonce: 0
net.inet.sctp.ecn_enable:
1
sight [08:50]
sigh [08:51]
They’re all different.
I have OpenSolaris here, too. Want that data
point?
sure
Booting…
- dtaht just had 3 new olpcs arrive and is mildly distracted
Nice. [08:52]
They make good nightlights, I’m told.
the 1.5s are better nightlights
the 1.75s (I’m on the list) are cool
I’m trying to convince them to add 5.x ghz support
Every child should have that.
hahahaha
Hmm… SunOS 5.11. sysctl not found… [08:53]
\$ ndd /dev/tcp \?|egrep -i
‘ecn|sack’
tcp_sack_permitted
(read and write)
tcp_ecn_permitted (read and
write)
[08:58]
(sunball:bmc) /etc \$ ndd -get /dev/tcp
tcp_sack_permitted
2
(sunball:bmc) /etc \$ ndd -get
/dev/tcp
tcp_ecn_permitted
1
[08:59]
http://download.oracle.com/docs/cd/E19963-01/html/821-1450/chapter4-31.html
(Oracle Solaris Tunable Parameters Reference
Manual)
ecn: 0 (disabled), 1 (passive enabled), or 2 (active
enabled)
[09:00]
Same values for SACK
Defaults are as shown above. [09:01]
excellent. [09:09]
I just tweeted this: When you’ve spent the last decade
mostly
using Linux and BSD, the infrequent foray into Solaris feels like
going
to Mars. #unix
So if I get you to turn it on, that will only leave about 2
billion
computers left to fix and 10s of thousands or routers left to junk
[09:10]
heheheh
solaris is like 1998
I don’t even want to think about how one accomplishes
this in
HP/UX.
Assuming it’s even possible.
thx for the data I’m going to update the wiki in a bit
Or, for that matter, AIX, which makes Mars seem
familiar.
hahahah
do these things have sysctl.conf?
I didn’t see a reference to an ndd.conf
[09:11]
http://www.sean.de/Solaris/soltune.html#ndd
Worth skimming. [09:12]
Of course, Solaris no longer has an /etc/rc.local,
either.
Instead, you’re supposed to create something in
/etc/init.d
(rc.local is fine), then symlink it to an “S” file in the
appropriate
runlevel directory (e.g., rc3.d).
sigh
Wait… [09:13]
I just ran across this:
To set parameters so they remain in effect after you
reboot the
system, add the parameter values to /etc/system when you want to
configure parameters for all devices in the system.
A startup script can also be used to set a ndd
parameters across
system reboots. Include the appropriate ndd command in a system
startup
script, such as the /etc/init.d/inetinit file or a customized script
in
/etc/rc2.d or /etc/rc3.d. Be sure to make a copy of any files
before
adding the ndd commands. [09:14]
ERC>
http://www.vistax64.com/vista-general/53861-how-do-you-enable-ecn-explicit-congestion-notification.html
[09:15]
Gotta run. Back later.
ERC>