Monday, March 11, 2013

Understanding Bandwidth vs. Throughput

A while back, I had a lengthy set of email exchanges where I needed to get it through someone's skull what the difference between Bandwidth and Throughput was. It seems they could not comprehend why upgrading from an underutilized 4.5Mb circuit to a 20Mb line didn't produce a noticeable speed boost when transferring large files.


To start, here's some math for you- This is the same sort of calculations that you do when calculating QOS on a router:

Say you have a 1.15 Gigabyte ISO file. That's 1,150,000,000 bytes which equals 9,200,000,000 bits.

If your line is 20Mbps with a 50Mbps burst – You only ever get the ‘Burst’ after the line is running at sustained capacity for a certain period of time – Effectively, the line must be slammed for a while.

First things first, lop 25% off the speed of the line to account for connectivity and signaling. (I’m factoring it as a direct line, not an Ethernet link, because that would be 33%)

So a 20Mbps line becomes 15Mbps usable – that’s 15,000,000 bits per second.

So 9,200,000,000 bits at 15,000,000 bits per second = 613.33 seconds. That’s 10.2 minutes.

THAT IS ASSUMING that:

  1. You have 100% of the line at your disposal.
  2. The NICs of both sides are performing at their correct bandwidth & duplex according to the switch.

Unfortunately, bandwidth has relatively nothing to do with speed. It has everything to do with capacity. Throughput governs speed. Think of it this way:

A network connection is very much like a highway. Bandwidth would dictate how wide the highway is- so a 5 Mbps circuit would be a 5-lane highway and an 8Mbps circuit would be an 8-line highway. However, the speed limit is 60 MPH, regardless if it’s a 5-lane highway or an 8-lane. That's throughput.

Now say there were 2 hotels, one on either side of the highway, one mile apart. One hotel gets a call that there is a big conference coming, say 20,000 people, and they are going to need empty suitcases to give away to everyone. So they put a call in to the other hotel to send over 20,000 suitcases. Now, it just so happens that the other hotel has 4,000 delivery cars, and each car will hold 5 suitcases.

On the 5 lane highway, each car must travel the speed limit of 60 miles per hour for the 1 mile between the hotels. That means it will take 1 minute for each car to travel the highway, but the highway supports 5 cars at a time. That means it will take 800 minutes for all 4,000 cars to make the trip.

Now, say a year later the conference happens again. Same scenario, one hotel needs 20,000 suitcases from the other. They still have all 4,000 delivery cars, and each car carries 5 suitcases. But now, the city has upgraded that stretch of highway from 5 lanes to 8 lanes. The speed limit is still 60 MPH, but for this trip the highway will support 8 cars at a time. This time, it takes only 500 minutes to deliver the suitcases.

This is what is happening with bandwidth. The data is not travelling across the wire any “Faster” than before, but more of the data can travel across the wire at a time.
If your old line was 4.5Mbps, than the speed limit is still 60 MPH, regardless. This is why it doesn't always “feel” faster when you upgrade your circuit, but visibly performs better when you initiate a big download. There’s more capacity, but you’re still talking from one location to another, and that hasn't changed.

Now, before you ask why your cable modem at home performs the way it does, lets apply the above scenario to your cable modem.

Lets say you want to download a 1 gig ISO from a university FTP share to your home PC. Imagine that the university’s bandwidth represents a 100-lane highway, while your cable modem represents only 16 lanes. The university is able to send more cars out onto the highway at first, but then they need to merge down to fit onto your 16-lane stretch of highway. Since you are the theoretically the only user, you get to use all 16 lanes to get your file. Say you upgraded to a 20Mb line – now instead of 16 lanes, you have 20. The same download feels faster because the university network has 4 more highway lanes to work with than it did before. But each packet is not physically travelling from them to you any faster than it was before.