Ubuntu Download Speeds Beat Windows XP's
narramissic writes "Doing a download speed test of his Time Warner cable connection, James Gaskin discovered something odd, something that he is quick to note isn't a rigorous benchmarked lab test. The discovery: His Ubuntu machine 'returned a rating from the Bandwidth.com test of 22-25mbps over several tests' while the same test done from a Windows XP PC returned a rating of 12-14mbps. The two computers used in the test are 'almost identical: both off-lease Compaq small form factor D515s, part of the very popular corporate desktop D500 family. Both have Pentium 4 processors running at 2GHz. The Ubuntu machine has 768MB of RAM, while the XP box has only 512MB of RAM. Both run Firefox 3 as their browser.' Gaskin's question: Can a little extra RAM make that much difference in Internet download speeds or does Ubuntu handles networking that much faster than Windows XP?"
If you can prove to people that you can download pr0n faster using Linux, they WILL switch!
I'm kidding! I'm kidding!
(or, am I?)
The test was done on machines with differing configurations, so therefore is not valid. But interesting nonetheless.
Help fight poverty: Punch a poor person.
His window machine's contribution to a bot net is probably hogging some bandwidth.
Clearly, there is no more reliable test of network performance than a flash application running inside of a web browser. On machines that are "oh, more or less" identical (I'd really like to know what network card is in them, for example?). Sheesh.
surely that is quicker than writing a /. article.
Nullius in verba
I'd guess it's some kind of TCP/IP optimization (the default size of packets, etc). It's set to one thing on Ubuntu, and another on Windows (probably for some historical reason or due to some old buggy driver).
If that's not it, I'd bet pretty high it's a bad driver in Windows.
It's quite likely that either Windows or Ubuntu is intrinsically faster for some reason, but I doubt the difference based on the way the networking stack is designed is anywhere near 10%, let alone 50% for a link this fast. On 10 gigE maybe, but not on a simple cable modem.
Comment forecast: Bits of genius surrounded by a sea of mediocrity.
Great, very scientific. Swap the OS on both machines and see if the results hold. Otherwise 'almost exactly the same' doesn't cut it. Do a real test - the way it is described here is bogus. It may excite the Linux fan boi's but no one else is going to take it seriously.
The poster said 'i think ubuntu downloads stuff faster than xp but I'm not sure... the RAM is different.'
So how did this make it to slashdot. Its not like anyone but the poster has the identical hardware to run the tests properly.
@poster: If the machines are so 'identical' then swap the memory and run the tests again.
You can't test two different machines with different cases and compare the results, that's not how the scientific process works. Both machines need to be tested against the same cases - then and only then will you be able to appropriately tell if the software made a difference.
Anyhow, back on the subject, some of WinXP's default networking parameters are a bit conservative when it comes to high-bandwidth links that don't have LAN-like latency (particularly the TCP Receive Window/RWIN); a good but short description of this can be found at DSL Reports. So I wouldn't be absolutely shocked if once he corrects his methodology, he still gets similar results, although in general I find RWIN tweaking to be bollocks compared to the few people that swear it works. Vista and later OSs include self-adjusting network stacks that compensate for this and then some (Microsoft is rather proud of their sustained bandwidth over very high latency links), so I wouldn't lose any sleep over it.
Anecdotally, I have also noticed that Ubuntu boxes tend to hog bandwidth, as compared to an XP box at home. When someone on the home LAN starts downloading or streaming something from a linux box, everyone else notices it immediately. The XP box is (inadvertently?) more polite about it. Still, if you're the only one pulling in the big byte loads, faster is definitely better.
It's the TCP implementations, and probably the TCP window size limits. Windows could turn in the same numbers if properly tuned.
You want to read this article for all the in-depth details: http://www.psc.edu/networking/projects/tcptune/
Windows has a default set many years ago, and never updated. Most of the Free Unix variants update every release, and some new variants even have fancy auto-scaling code. Any time you want to get over 10Mbps/second across any real latency with a SINGLE TCP stream you probably need to do some tuning, for some OS's the limit is much lower.
ISP's run into this all the time. An uninformed admin buys a GigE in LA and NY, pops up an FTP server and wonders why he can only get a few megabits a second across the "crappy network". A few settings later and behold, the same hardware can saturate a full gigabit.
Note, don't just go set your values really high, there are performance (memory used) tradeoffs....
Actually I can see it all the time. My Ubuntu laptop's (IBM T42) WiFi is about 50% faster that the same configured Windows machine of my wife. We're talking about SAME hardware. I don't really know if it's drivers, or something else.
Performance on LAN is more similar, difference is about 10-20% max, but with this kind of hardware it heavily depends on HDD to write data and Windows is crap at this - it's swapping - god knows why!!!
"an experienced, industrious, ambitious, and often, quite often, picturesque liar" - Mark Twain
Only on slashdot can you have front page articles featuring original "research" done with no controls, no baselines, dissimilar base conditions, and sample bases of one single result, and have the headline speak conclusively in favour of the observed results.
If it makes FOSS looks good, that is. This is worse than digg.
...lets start with RTFS. Everyone here who keeps bitching about how this isn't a decent test obviously missed the bit of the summary where he admits it isn't, and he isn't asking if Uubntu is faster than Windows. He is specifically asking whether the difference is in the machines themselves or the OS.
One machine has a Hello Kitty sticker on it and faces West. Irrelevant? WE REPORT, YOU DECIDE!
Maybe the tester is too close to a mental energy vortex...
Who cares about the boxes themselves at this point?
The test FAILS because they're using the Internet instead of a network where they can control the other factors.
possibly due to tcp window scaling
http://en.wikipedia.org/wiki/TCP_window_scale_option
ubuntu does it. Windows XP does not.
The TCP window scale option is an option to increase the TCP receive window size above its maximum value of 65,536 bytes. This TCP option, along with several others, is defined in IETF RFC 1323 which deals with Long-Fat networks, or LFN.
-rant mode, how I found out about it.
The secure side of the Presidents Choice banking web site is royally hosed by a machine that tries to use tcp window scaling. Why can't a web service provider, one that should be extra careful about security understand a standard concept.
Yeah, if its a 12mbps link, and ubuntu is getting 22mbps, there is more likely something else going on than "ubuntu > xp" here.
A lot of cable providers provide 'speed boosts' to the first bit of bandwidth you request from a given source. It makes the internet as a whole a lot snappier, while large downloads etc take about as long as usual.
Perhaps they speed boosted his ubuntu test for some reason.
Another possibility, is that their bandwidth analyzer isn't working properly on ubuntu and is reporting double what it should be.
I mean, if XP was getting significantly less than his link speed and ubuntu was getting the full link speed I'd suggest bad drivers, bad cable, bad something... but XP is delivering what it should be, while ubuntu is delivering apparently more than is possible -- so my first approach would be to ensure ubuntu is REALLY getting 22mbps here, and determine how that's even possible.
e.g. ... When you measure the speed of light and find it to be twice c, your first assumption would be that you've done something seriously wrong in calculating the result, not that you've just figured out a technique for FTL communications.
I've spend a lot of time looking at this type of problem. I had a customer that wanted to transfer data at greater then 10 mbps across the internet, across the country. Lets just say with windows this is impossible.
The problem has to do with TCP algorithms. I found the ones in windows are optimized for common cases. Linux has multiple TCP/IP algorithms you can choose from. Most are significantly better the one used in windows.
The "problem" with TCP is it has to assume that packet loss equals network congestion. This is a good thing for an over-loaded network link. As the link fills up, it starts dropping packets. As the computers on each end of a TCP connection see this packet loss, they start "Backing off". They slow down their transmission rates until the packet loss is gone. In most cases they back way off, and then slowly increase the speed until they start seeing a little packet loss. The methods they use to determine what is congestion, how much they slow down, and how they recover from it greatly effects total usable bandwidth.
The bottom line: TCP Algorithms greatly effect transfer speed, and no algorithm is good for every situation. Linux gives you flexibility in this area (And by default uses a better one), and windows gives you zero.
To test raw bandwidth, you have to saturate a link with UDP data, and count how much data is received. This is pretty pointless as its not the useable bandwidth, but it does tell you the "raw" potential. The problem is the "raw" potential can be subverted by a small amount of packet loss.
That's a myth.
Clarification about the use of QoS in end computers that are running Windows XP
As in Windows 2000, programs can take advantage of QoS through the QoS APIs in Windows XP. One hundred percent of the network bandwidth is available to be shared by all programs unless a program specifically requests priority bandwidth. This "reserved" bandwidth is still available to other programs unless the requesting program is sending data. By default, programs can reserve up to an aggregate bandwidth of 20 percent of the underlying link speed on each interface on an end computer. If the program that reserved the bandwidth is not sending sufficient data to use it, the unused part of the reserved bandwidth is available for other data flows on the same host.
http://support.microsoft.com/kb/316666
Dell XPS M1530 Intel Core 2 Duo (2.16ghz) 3 gigs RAM Dual Booting Windows Vista Home Premium AND Ubuntu 8.10 http://www.bandwidth.com/tools/speedTest/ Six tests per OS. Vista: Download/Upload 7616/2795 7865/2724 6407/2755 10050/2800 12320/3925 15854/2905 Ubuntu: Download/Upload 12939/5897 8849/12122 15373/18646 20040/17093 8461/14969 17885/13807
I know Comcast has a thing (Powerboost) where it gives you double download speeds for the first x minutes of a download. Could that be at work here?
Fine, what is this then:
Windows (Cygwin):
$ ping -n 20 www.google.com
Pinging www.l.google.com [74.125.39.147] with 32 bytes of data:
Reply from 74.125.39.147: bytes=32 time=12ms TTL=245
[...]
Ping statistics for 74.125.39.147:
Packets: Sent = 20, Received = 20, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds: Minimum = 11ms, Maximum = 41ms, Average = 16ms
Ubuntu:
lukas@9a:~$ ping www.google.com
PING www.l.google.com (74.125.39.147) 56(84) bytes of data.
64 bytes from fx-in-f147.google.com (74.125.39.147): icmp_seq=1 ttl=245 time=15.3 ms
--- www.l.google.com ping statistics ---
22 packets transmitted, 1 received, 95% packet loss, time 21003ms
rtt min/avg/max/mdev = 15.321/15.321/15.321/0.000 ms
Happens on my network no matter what I change - cables or notebooks, Vista runs ok, Ubuntu sucks big time. The only non-standard thing is that I have wired connection with manual IP address (connected by Linux based Asus router).
lukas@9a:~$ lspci | grep Eth
00:19.0 Ethernet controller: Intel Corporation 82567LM Gigabit Network Connection (rev 03)
>I wish apple would sell a powerbook with a real right-click.
And I wish other laptops had the "two finger" right click and the two-finger scroll.
-fb Everything not expressly forbidden is now mandatory.
How cunning.
winXP x64 sp2:
ubuntu 8.10 x64:
huh, weird.
Modern Linux kernel 2.6.17 and later has TCP auto tuning, so it can better adapt to the network and saturate it. http://www.psc.edu/networking/projects/tcptune/#Linux Windows XP default TCP window size is too small and needs registry tuning for it to be optimized high speed broadband connections. Just google for WinXP TCP tuning. Or try comparing with Vista as it has better TCP/IP stack.