Network explanation: megabytes or megabits?

I'm getting confused with network terms.

Can you explain to me how I calculate network bandwidth?

When people say 20Gbps does it mean 2.5 G bytes?

I really need to understand what it means when a VPS company says "Bandwidth: 2000GB / Month".


Solution 1:

Gb is supposed to refer to bits and GB is supposed to refer to bytes. Bandwidth is always measured in bits per second but files on disk are measured in bytes.

Your best bet is to have the VPS company define the terms they are using so that there is agreement because the terms are often misunderstood or misused.

Solution 2:

Network bandwidth is typically expressed in quantity of bits per unit of time -- e.g. 45Mb/sec (small b), or 45Mbit/sec. This expresses a rate of transfer.

The amount of data transferred is typically quoted in an absolute quantity of bytes moved - e.g. a 50MB (large B) file, or 50MBytes of data.


Most colocation providers sell bandwidth by transfer rate - You are allowed so many bits per second, and are either capped at that rate or allowed "burstable bandwidth" (with burstable bandwidth you are typically billed based on the 95th percentile of your usage -- use a lot of excess bandwidth, get a bigger bill).

Some providers sell by quantity of data transferred -- this is more common with shared web hosting companies. You can convert this to a rate via a rough approximation (multiply the quantity number by 8, then divide by the number of seconds in a billing period - 2592000 seconds is approximately one month (30 days)).
The caveat here is that the rate you calculate is pretty much meaningless: You could do zero traffic for 29 days, then shove all 50GB out on day 30, and as far as your provider is concerned you're within the limits of your utilization. Limiting yourself to a maximum of the rate you calculate minus a small margin for padding almost guarantees you won't exceed your transfer cap, but may hurt performance unnecessarily.

The reverse of that formula will give you a rough approximation of max quantity transferred for a given rate cap, which is possibly more useful, but bear in mind that providers that bill based on rate count every bit that goes over the wire (packet, protocol and payload), so the actual quantity of data (payload) you can move is somewhat lower than the raw number would lead you to believe.