Google, Microsoft Cheat On Slow-Start — Should You?
kdawson writes "Software developer and blogger Ben Strong did a little exploring to find out how Google achieves its admirably fast load times. What he discovered is that Google, and to a much greater extent Microsoft, are cheating on the 'slow-start' requirement of RFC-3390. His research indicates that discussion of this practice on the Net is at an early, and somewhat theoretical, stage. Strong concludes with this question: 'What should I do in my app (and what should you do in yours)? Join the arms race or sit on the sidelines and let Google have all the page-load glory?'"
Without cheating, I wouldn't get the first post.
RFC 3390 uses the "MUST" terminology exactly one place: when describing behavior after a packet is lost during the syn/synack. It doesn't use the phrase "MUST NOT" anywhere.
In every other respect slow-start is recommended but optional. Google is in no way breaching the standard by not using it.
Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion.
...if it wasn't for slow start. Damn you, cwnd!
So kdawson couldn't post this FUD himself? He needed Soulskill to do it for him?
When the competition starts crying you know someone is doing something right. Is it just me or has there been a lot of crying lately
did you forget to take your meds?
This is reliable. It is comaptible with the spec (otherwise it wouldn't be reliable), and it's faster.
I don't think it matters whether Google "cheats" or not. I and they both want me to get the data as quickly as possible. Strict adherence to the guidelines doesn't matter to either of us and doesn't affect anyone else.
I intentionally removed kdawson and timothy from the front page on slashdot just so I wouldn't have to see their ignorant, retarded, not a fucking clue posts ...
Did they realize that no one read their tripe anymore now they have to have someone else approve it for them?
kdawson and timothy are idiots, please give me a way to automatically not see anything that has to do with those two morons. Please.
kdawson is cheating to get around the effort I put on not seeing his crap, MS and Google on the other hand are following the RFC just fine ... if anyone involved in the posting of this story had a clue about what it said or did any sort of actual research than I wouldn't have to rant about it ...
Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
Seriously, that guy will never get his app running, he will spent next two years reinventing TCP/HTTP and what not, before he gets to the application layer again.
That's been known in the TCP community for decades.
I looked at this back in my RFC 896 days, when TCP was in initial development and I was working on congestion. I introduced the "congestion window" concept and put it in a TCP implementation (3COM's UNET, which predated Berkeley BSD). The question was, what should be the initial size of the congestion window? If it's small, you get "slow start"; if it's large, the sender can blast a big chunk of data at the receiver at start, up to the amount of buffering the receiver is advertising.
I decided back then to start with a big congestion window, because starting with a small one would slow down traffic even when bandwidth was available. One of the big performance issues back then was the time required to FTP a directory across a LAN, where TCP connections were being set up and torn down at a high rate. So startup time mattered. The decision to go with a smaller initial congestion window size came years later, from others. This reflected trends in router design. I wanted routers to have "fair queuing", so that sending lots of packets from one source didn't gain the sender any bandwidth over sending few packets. But routers gained speed faster than RAM costs dropped, and so faster routers couldn't have enough RAM for fair queuing. Today, your "last mile" CISCO router might have fair queuing. Some DOCSIS cable modem termination units have it. But many routers are running Random Early Drop, which is a simple but mediocre approach. (The backbone routers barely queue at all; if they can't forward something fast, they drop it. Network design tries to keep the congestion near the edges, where it can be dealt with.)
Remember, every dropped packet has to be retransmitted. (Too much of that leads to congestion collapse, a term I coined in 1984. That's what the "Nagle algorithm" is about.) In a world with packet-dropping routers, "slow start" makes sense. So that was put into TCP in the late 1980s (by which time I was out of networking.)
However, the RFC-documented slow start algorithm is rather conservative. RFC 2001 says to start at one maximum segment size. Microsoft's implementations in Win95 and later start at two maximum segment sizes. In RFC 3390, from 2002, the limit was raised to 3 or 4 maximum segment sizes. (We used to worry about delaying keystroke echo too much because big FTP packets were tying up the 9600 baud lines too long. We're past that.)
But Google is sending at least 8 segments at start, and Microsoft was observed to be sending 43. Sending 43 packets blind is definitely overdoing it.
I wonder whether they're doing this blindly, or if there's more smarts behind the scenes. If their TCP implementation kept a cache of recent final congestion window sizes by IP address, they could legitimately start off the next connection with the value from the last one. So, having discovered a path that's not dropping big bursts of packets, they could legitimately start fast. If they're just doing it the dumb way, starting fast every time, that's going to choke some part of the net under heavy load.
Slow start and congestion avoidance were designed in the time of unreliable networks. Shouldn't the TCP/IP protocol be rediscussed in the age of fiber networks?
The Third rule of network design, for a moral being, is to consider the moral, ethical, and legal consequences of any atypical changes you make to your behavior.
Why the Third rule?
Because the first rule is to figure out what on earth is going on--not just in theory, but in fact. Code for the OSI model is ugly, perhaps by necessity (it has to be very fast), but it's code that is very, very easy to get wrong. It involves a lot of interacting pieces working on different levels of abstraction with other players that you don't have code control over.
The second rule is to realize when the first rule means that you shouldn't touch the stuff. Google and Microsoft have the engineering competence to mess with it--MSFT even should be messing with it, in terms of looking for ways to improve their behavior in a community-friendly way. Because they write the code that handles a huge portion of connections, and let's face it, TCP/IP just isn't designed for lots of things: AJAX or broadband, for example.
The third rule is to consider the moral and ethical and legal consequences of changes.
Only after at least these three steps should someone make changes that involve connections that go beyond the computers they control.
-- IANAL, this isn't legal advice, and definitely isn't legal advice for you. Also, Squee!
You do realize that if servers on the Internet start ignoring Internet standards (RFCs) as a matter of usual
practice that there is a very good chance the net will, if not grind to a halt, develop instability, the probability
of unreliability, poor performance, isolated unreachable islands etc.
This is a clear case of the tragedy of the commons. Only the general adherence to RFCs and effective
shunning mechanisms have prevented the tragedy from occurring so far.
Where are we going and why are we in a handbasket?
Well, this guy discovered something but wasted time he should have been working on his web app ;)
Has anyone taken a look at whether Google, Microsoft, et al are similarly pushing on the TCP congestion backoff and recovery mechanisms?
First, implement it, and show that it works in practice.
Later, standardize the proven best practices.
Google, ur doin' it rite! :D
"Convictions are more dangerous enemies of truth than lies."
Please, I'd like to use this on our web servers too... :-P
"I love my job, but I hate talking to people like you" (Freddie Mercury)
http://tools.ietf.org/html/draft-hkchu-tcpm-initcwnd-01
http://code.google.com/speed/articles/tcp_initcwnd_paper.pdf
I'm not getting the blinding fast response time shown in the article at all :(
Google looks up my country via geo-location and feeds me a localised version (tested via the curl method in the article). This takes 0.9 seconds for me. If I directly specify google.co.uk or some other variation, I get a more reasonable 0.3 seconds. But never 85ms. Is the author sitting on a really awesome connection at work? ;)
I understand the theoretical problem with breaking the spec, but since it actually took this guy a packet sniffer to detect the violation, it would seem that, in practice, most (all?) clients out there are perfectly capable of processing this non-standard response. If so, then I don't see a problem, since it really is a de facto standard - and those appear all the time. The best thing they could do then is publish a new RFC to make it part of the spec, and move on.
Yeah, yeah, IETF, open standards, "proven to work", threat of arms-race, danger of congestion collapse, what have you.
There are _almost_ insurmountable reasons IN PRINCIPLE to abhor people/companies who want to violate fundamental RFC's in this way.
But every rule has its exception. Here you are dealing with TCP. It's so broken, so backwards, so conservative (not so much in a "play it safe" sense but
in a "the gods thus spake in 1989, and their prophet Van Jacobsen likewise sayeth" sense) that at some point you have to
say enough! Continuing the metaphor, much TCP research is like the work of a religiously devout scientist --- trying to make advances,
trying to be relevant, while working in knots to avoid saying anything directly that would commit overt heresy. Similar issues arise for companies trying to work through
IETF and the TCP orthodoxy. (Look, I know how mis-usable this line of argument could be. I hate myself a bit for making it. But it's TCP. This is a special case; a special disgrace for the IETF).
Even browsers do crazy things on this principle. We'll open 2 (or 4, or whatever, depending on how clever you are) connections to the same web server. ... not so, but TCP
Why??? The pipe(s) remain the same. Ah... but but any individual connection can remain compliant. The aggregate
doesn't constrain aggregates so one can remain in the church.
TCP needs bolder, better, research and its has failed to get it (or rather, failed to get it broadly accepted; there is lots of great stuff out there); the conservative IETF participants
with an interest in TCP are an unconstructive obstacle whose impact has been hugely negative over the last 15 years.
In the absence of this, companies like Google and Microsoft have little choice but to drive us forward using their own judgment.
Scan man ip(1) for initcwnd. No need for patches.
I suppose now would be a good time to point out that RFC 5681 is the most current specification of the standard for TCP congestion control. Would it be asking too much for people to stay current on the RFC series before they start cracking off about standards compliance?
jhw
When did RFCs official standards at which you could "cheat"?
Consider this "cheating" Google and Microsoft's comments.
Before writing a post like this, you might want to wait a few minutes for the inevitable corrections to the inevitably wrong Slashdot story comes in. A good 50% of the stories on this site are misleading, and probably 25% of those are blatant lies.
Here's a pro-tip: if it says kdawson either as the editor *or* the submitter, it's complete bullshit. I don't think he's ever gotten a story entirely right in this whole career.
Comment of the year
If you type
man ip
You will see that you can set the initial congestion window on a given route using
ip route change initcwnd NUMBER
*Where NUMBER=The maximum initial congestion window (cwnd) size in MSS of a TCP connection. I believe applications may also choose socket options although most of the time it's left to the OS. So go ahead and set it to 10 or whatever.
Cool! Amazing Toys.
http://tech.slashdot.org/comments.pl?sid=1512306&cid=30785704 because you opened your mouth & inserted your foot vs. myself before in regards to coding...
(TO WIT: That url above's where you said I had "no clue on how to write multithreaded code" & it turned out NOT ONLY DID YOU SKIM & MISS THE POINTS WHERE I COVERED IT? LOL, but I also showed that I personally have apps out there now for over 11 yrs. now that ARE MULTITHREADED (& that's just "freewares" I wrote... & funniest part is, after all your name tossing?? Your BIG MOUTH couldn't show YOU HAVE DONE THE SAME... so much "4U")).
---
"I intentionally removed kdawson and timothy from the front page on slashdot just so I wouldn't have to see their ignorant, retarded, not a fucking clue posts ..." - by BitZtream (692029) on Friday November 26, @02:16PM (#34351864)
So, it seems you're saying you have some "level of moderation & forums posts control" here... somehow I find that tough to believe, but, if it is in fact, truth (& I don't want to hear you say "oh I was just joking" because that's the LAMEST of all "outs")?
That explains a lot about that 1st URL I put up above then...
I.E.-> "Small wonder" (not) that my post I put up was "modded down troll" then, even though I SHOWED YOU WERE IN ERROR, A SKIMMER, AND THE "TRUE TROLL" who shot his big mouth off prior to even knowing who I am & what I've done etc. & you've never done the same, yourself! Anyone can be an "armchair QB", Bitz, and you prove that much - especially since it turned up that a lot of what you shoot your big yap off about, you've NEVER EVEN DONE YOURSELF!
(Additionally? Your name tossing now only makes you appear to be more the crude fool, yet again, to top off your blunder I cited in the 1st URL I posted above).
APK
P.S.=> Lastly? Please - DO "mellow out", & grow up... those guys are doing the best they can, & IF the mgt. here REALLY doesn't LIKE them? They can fire them (if they are in fact, getting paid or are actual hires, that is)... apk
Do you always talk in Perl? I'm not taking sides in what seems to be an embarrassingly petty argument, but that post was truly awful to read.
Meta will eat itself
"Do you always talk in Perl?" - by tygerstripes (832644) on Monday November 29, @07:31AM (#34373280)
Do you always deny proof I have where that fool BitZtream came in saying "another person that doesn't know how to code threads" and yet I have been doing that and I had proof of it, online even, & for over a decade now -> http://tech.slashdot.org/comments.pl?sid=1512306&cid=30785704 ?
(Not even a "nice try", and your 8 digit registered LUSER ID here isn't helping your case either mind you, and PERL regex's don't look like that anyhow... so much for your added sarcastic b.s. here!)
---
"I'm not taking sides in what seems to be an embarrassingly petty argument, but that post was truly awful to read." - by tygerstripes (832644) on Monday November 29, @07:31AM (#34373280)
Oh, yea, lol - "Sure you're not" (what w/ your 8 digit userid and BitZtream not getting a tongue lashing from you too? Yea, ok) - sarcasm on the "sure you're not"...
A little obvious on YOUR part, don't you think?
All anyone has to do is click on the URL from this site above, and they will see where BitZtream opened his mouth having NO idea who he was speaking to, and he had to "eat his words".
Funny you don't bitch about BitZtream's profanity and what-not either. No little TOO obvious you're either he, or some pal of his, especially w/ your 8 digit LUSER id here.
APK
P.S. => All I can say is, you're a joke, and you're not fooling anyone: However, IF you cannot read?
Get remedial reading help...
Don't like what I wrote?? Don't read it... simple!
As to others not being able to understand what I write (which your "bitch" is the oldest troll trick in the book):
I can show over 130++ posts where readers "modded up" my posts (a few this week even), and they apparently disagree with your overtly obvious line of b.s. here since they modded up my posts and understood my points!
(So, apparently, YOU have the reading hassles, & I don't post in the style of "See Dick Run" on the note of style here (of which you are clearly NOT a PHD in English yourself, and thus NO EXPERT in it), sorry)... apk
"Do you always talk in Perl?" - by tygerstripes (832644) on Monday November 29, @07:31AM (#34373280)
140 others here think otherwise (as to the content in my posts here):
---
+5 'modded up' posts by "yours truly" (7):
http://it.slashdot.org/comments.pl?sid=1139485&cid=26975021
http://news.slashdot.org/comments.pl?sid=1884922&cid=34350102
http://science.slashdot.org/comments.pl?sid=1872982&cid=34264190
http://it.slashdot.org/comments.pl?sid=1139485&cid=26974507
http://it.slashdot.org/comments.pl?sid=170545&cid=14210206
http://hardware.slashdot.org/comments.pl?sid=175774&cid=14610147
http://tech.slashdot.org/comments.pl?sid=1806946&cid=33777976
----
+4 'modded up' posts by "yours truly" (4):
http://slashdot.org/comments.pl?sid=161862&cid=13531817
http://developers.slashdot.org/comments.pl?sid=167071&cid=13931198
http://tech.slashdot.org/comments.pl?sid=1290967&cid=28571315
http://tech.slashdot.org/comments.pl?sid=1461288&cid=30273506
----
+3 'modded up' posts by "yours truly" (5):
http://developers.slashdot.org/comments.pl?sid=155172&cid=13007974
http://it.slashdot.org/comments.pl?sid=166850&cid=13914137
http://slashdot.org/comments.pl?sid=175857&cid=14615222
http://slashdot.org/comments.pl?sid=273931&threshold=1&commentsort=0&mode=thread&cid=20291847
http://it.slashdot.org/comments.pl?sid=1021873&cid=25681261
----
+2 'modded up' posts by "yours truly" (27):
http://it.slashdot.org/comments.pl?sid=158231&cid=13257227
http://it.slashdot.org/comments.pl?sid=1361585&cid=29360367
http://science.slashdot.org/comments.pl?sid=158310&cid=13263898
http://it.slashdot.org/comments.pl?sid=1361585&threshold=-1&commentsort=0&mode=thread&cid=29358507
http://it.slashdot.org/comments.pl?sid=158231&cid=13257227
http://slashdot.org/comments.pl?sid=290711&cid=20506147
http://slashdot.org/comments.pl?sid=245971&cid
http://news.slashdot.org/comments.pl?sid=1884922&cid=34350648
LMAO!
http://developers.slashdot.org/comments.pl?sid=1885098&cid=34374466
140 other people here disagree with your "trollish opinion" with no facts behind it (per the evidences thereof in that URL above).
Why is that?
(Funny how that many people here tended to disagree with your "old troll trick" statements about my writing style, because they modded me up +1 - +5 on many grounds (this is just a forums by the by, not a paper for a grade, or a legal correspondence either)).
Yea, that old "troll trick" of "your writing style is bad" etc./et al, it always seems to "fall apart" whenever solid evidences are used vs. it (such as those I provided in the URL above I just posted here).
Oh, & by the way: Addtionally - Care to produce your PHD in English to show us all that YOU are an "expert on writing"?
(Didn't think you would, OR could!)
APK
P.S.=> Ah, as-per-usual with myself vs. the trolls here? Just too, Too, TOO EASY (just too easy)... apk
Yes, 10 has been recommend as the new initial window:
http://tools.ietf.org/html/draft-hkchu-tcpm-initcwnd-01
New things are always on the horizon
I think you meant:
ip route change default via $GW dev eth0 initcwnd 10
Where $GW is your default gateway.
New things are always on the horizon