
Google and Microsoft Cheat on Slow-Start. Should You?  - finnw
http://blog.benstrong.com/2010/11/google-and-microsoft-cheat-on-slow.html?m=1
======
ck2
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.

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

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

~~~
usetee
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.

------
ChrisLTD
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.

~~~
joblessjunkie
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).

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

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

------
joedev
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".

~~~
joedev
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?

------
Natsu
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.

------
AndrewDucker
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.

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

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

~~~
tfb
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.

~~~
bzbarsky
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.

------
nn2
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

