Search code examples
androidubuntubandwidth

How is bandwidth of an internet connection on a network interface calculated by operating system


I have ubuntu 14.04 LTS ,and opening connection information window from the top title bar->network connection icon, I see the following:

General: interface: ... h/w address: ... speed: 65Mbps security: ... etc...

Similarly, on my android htc explorer phone, tapping on the current wifi connection, it displays bandwidth: 39 Mbps etc... among other things.

I know that calculations of bandwidth are done by taking the amount of packets received in the interface and the time taken for the same and dividing one by the other.

But how is the time of end of packet transmission determined. For example, I may open a http page in browser, for 1 minute and then sit idle for the next minute. But Operating system wouldnt know that using the first minute only, the bandwidth should be calculated and second minute shouldnt be included in the calculation.

Not only that, there may be a situation where bandwidth is underused for some time, and how does this affect the bandwidth calculation of operating system on an interface.

Iam actually confused.. I want to know both the OS perspective and the HOW of general passive method of bandwidth calculation in a system. pls help.


Solution

  • This isn't al calculation, is the speed that you're currently connected to your WiFi hotspot. There is a relationship between the power of the signal (dbM) and the speed of the link.

    EG: 802.11g at optimal conditions works at 54 Mbps. Go a little further, and you'll see this speed decreasing.

    This is related to the 802.11 standard, so it's the same on all OSes (android, ubuntu...) that you mention

    EDIT: You can see the list of network speeds here