Hacker News new | past | comments | ask | show | jobs | submit login
Google and Microsoft Cheat on Slow-Start. Should You? (benstrong.com)
177 points by finnw on Feb 25, 2012 | hide | past | favorite | 31 comments



This seems like deja-vu, I swear this was on HN before. (yeah probably without the m=1 on the url)

Anyway, super easy to try on linux servers.

First double check your existing setting

    sysctl -a | grep tcp_slow_start_after_idle
then

    sysctl -w net.ipv4.tcp_slow_start_after_idle=0
if you want to enhance to IW10 then first check the last line of

    ip route show
should be something like

    default via 1.2.3.4 dev eth0  
then copy it to the middle of this

    ip route change default via 1.2.3.4 dev eth0 initcwnd 10

if you are using a VERY current linux kernel, you can also add initrwnd like so:

    ip route change default via 1.2.3.4 dev eth0 initcwnd 10 initrwnd 10
Note the ip route change is not permanent unless you add it to something like /etc/rc.local

You should be able to see the change before/after in wireshark if you look very very carefully at the milliseconds before the first real ack.


Recent kernels already have initcwnd and initrwnd set to 10. Since 2.6.38 or so. If you're using recent kernels (any 3.x), manually setting those to 10 won't change anything.

Somewhere in the early 2.6.3x, I think around .32 or .33, had the two patches to allow setting initcwnd and initrwnd as you demonstrate.

Somewhere in 2.6.35 or 2.6.36 era, initrwnd was changed to 10. Later, around 2.6.38, initcwnd was changed to 10.

I've seen people claim that certain web accelerators use an initcwnd more like 20 to 40.


CentOS 6.2 (the most recent version of a very popular server linux) is using 2.6.32

You can change initcwnd on CentOS 6.2 but not initrwnd. And it defaults to 3

People can check their server kernel version with

     uname -a
Servers that appear to be at 20 or especially 40 might just be setting the buffers to match the maximum client side window (which is what Microsoft appears to do on their servers).



I didn't realise it had been on HN already. I just saw it because Sam Saffron tweeted it. I guess I should search more thorougly (I just searched for "cheat" and checked the first page.)


Don't sweat it, I didn't see it the first time and it's a good read, glad it was reposted. I'm sure I'm not the only one.

Also, HN search for previous submissions is hit or miss. A more reliable way is to search ddg or google for 'site:news.ycombinator.com [url you want to submit]'.


This has been on HN before. I read the article and comments as well as used the information at work.

If I had time I would go dig it out but unfortunately I'm leaving for a midterm. Maybe someone else can find it; I think it had a good discussion with it.


Is there any reason to use sysctl over "echo > /proc" or is it just a matter of taste?


Well, you can put your changes in /etc/sysctl.conf instead of coming up with a homegrown script to do a whole bunch of echos.

For me, I can just copy over a modified sysctl.conf to a server and have such changes applied (reboot may be needed).


For loonix only sysctl's I guess it would be a matter of taste; however, if you want to keep your muscle memory strong for operating systems lacking full /proc support, you might prefer the sysctl command.


"sudo sysctl -w ..." works as expected, but "sudo echo ...> /proc/..." doesn't, since only the echo and not the redirection happens as root.


That depends on what you expect, doesn't it? At any rate, you can easily do something like

echo 1 | sudo tee /proc/foo

This has the added bonus that you can replace "echo 1" with a complex script that may not be safe to run as root.


I'm new so the re-post is awesome :)


Slightly off topic: the Blogspot mobile theme is killing me with their swipe left and right gestures to navigate posts. When I'm scrolling down the page on my iPhone, I accidentally activate it constantly.


This happened to me twice while trying to read this post.

It's frustrating how often a website will provide a client-specific rendering which is much worse than the default. (I'm looking at you, Wordpress).


I thought this is actually in the process of being standardized?

http://tools.ietf.org/html/draft-ietf-tcpm-initcwnd-02


Ben fails to mention that the equation he proposed is "violated" is expressly "optional" and in fact the standard allows that "a TCP MAY start with a larger initial window".


Maybe I'm not reading rfc3390 right? This:

"This increased initial window is optional: a TCP MAY start with a larger initial window."

And specifically this: "MAY start with a larger initial window". "larger" than what?

a.) larger than that proposed?

or

b.) larger than was standard before this proposal?


From the article: > Being non-standards-compliant in a way that privileges their flows relative to others seems more than a little hypocritical from a company that's making such a fuss about network neutrality.

That's completely off the mark. NN was a reaction to the plan by ISPs to throttle large sites (e.g. YouTube) that their own customers were requesting unless they were paid protection money. It later became a political thing, with people mostly deciding to support (or oppose) it based on party lines.

It has nothing to do with tuning one's network, in spite of rhetoric to the contrary. It was just an attempt to stop rent-seeking by greedy ISPs that has morphed politically after attracting lobbyist attention.


It doesn't seem that unreasonable to make a starting point of the median number of packets that Google's customers can cope with at once, and then fail down the way for those that have problems.


It's kind of interesting that Google breaks TCP/IP protocol rules (RFC 3390) and their home page has never been valid HTML either.


You'd probably be inclined to cheat if your business had the most-viewed web page in the (Western?) world.


I'm not sure I would call it cheating. When I think of cheating, I think of a restricted action that gives an unfair advantage over competitors, of which is incredibly difficult for competitors to duplicate. But implementing the same hack, in this case, is easy, fairly common, and it isn't stepping outside of any real boundaries so it's not like the playing field is uneven. It also works and works well to provide users (customers) with a better experience.


The problem is that if everyone implements a very large initial congestion window that just causes more network load on networks that can't handle that amount of data all at once.

So it's not "cheating" in terms of your competitors, but it's "cheating" in the sense that either you're basically jumping the queue for your TCP flows or everyone else does the same thing and then things are back to square one, if networks can't deal with it.

An argument that networks now can deal with much larger congestion windows can be made, and Google is making it in the IETF, of course.


Absolutely. Think of the bandwidth cost of a single character. Google.com isn't made to be pretty, nor should it be.


I wonder how many gigs of transfer one can shave by cutting a single character from the Google homepage?


I wonder why they added so much crap to it lately then :P


first you learn how to use the rules, then you learn how to break them.


And finally you are powerful enough to enforce your own rules.


in my days it was called embrace extend extinguish.


the microsoft behavior of disabling SS completely seems downright immoral to me. Who cares if the internet melts as long as they can deliver their home page a few ms faster. And it's not even a very interesting homepage




Consider applying for YC's first-ever Fall batch! Applications are open till Aug 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: