Is it possible to measure bandwidth using ping?
Asked Answered
R

7

2

Can we find the internet bandwidth from the time it takes to ping a server if yes how is it done

Repand answered 21/4, 2009 at 10:40 Comment(2)
near duplicate of #729646Monas
duplicate of https://mcmap.net/q/2037186/-bandwidth-from-latencyBusk
A
10

No, ping tells you nothing about the bandwidth, it just measures latency. Measuring bandwidth is best done by a dedicated test, i.e. transferring a bunch of bits and measuring how long time it takes. You might want to consider that the bandwidth can vary dramatically with many factors, such as:

  • Direction; A to B might be faster than B to A, or vice versa
  • Time of day; depending on general load level of links involved
  • The exact route taken, which in turn can vary randomly
Aigneis answered 21/4, 2009 at 10:42 Comment(1)
@publicENEMY, which google paper you are talking about ?Astronavigation
E
6

You might be able to make a very crude measure by creating pings of differing sizes

You could then use the difference in the latency between the smaller and larger pings to form the basis of your latency calculation.

Practically though with broadband speeds this would yield no meaningful data. At modem speeds or slower you may be able to get an indication of bandwidth, but it is unlikely to be accurate and repeatable.

But as others have already indicated pings are best used as an indication of latency and there are better ways to measure bandwidth.

Easternmost answered 21/4, 2009 at 10:50 Comment(0)
H
4

Some years ago, I did some investigation into the relationship between latency and bandwidth use over cable.

Basically, if you start from zero bandwidth and increase bandwidth use, latency very slowly increases - until you hit about 90% of your bandwidth. Then latency goes through the roof, up to another plateau, after which it again increases slowly.

Hubbard answered 21/4, 2009 at 10:55 Comment(1)
This has worked for us as well (used in a multiplayer game using UDP). The "scientific" name for the more elaborate variant is Packet Pair Probing. The explanation for the effect is that most intermediate nodes use buffers to store pending packers, and once you saturate the path, some buffers will start filling.Tailgate
U
1

No, but you might be able to estimate the latency.

Utrecht answered 21/4, 2009 at 10:41 Comment(0)
B
1

Please take a look at top-5-unix-network-monitoring-utilities

Bifilar answered 21/4, 2009 at 10:55 Comment(0)
V
0

You can measure bandwidth if you know the latency of the channel beforehand.

You can use big ping packages and estimate the bandwidth knowing the type of channel and the expected RTT.

Vip answered 21/4, 2009 at 11:25 Comment(0)
R
0

I asked the same thing but what everybody says is true ping will not measure bandwidth well. this batch listed below is a bandwidth speed test with ping but its limited to a max of 1000kb/s and in this simple form doesn't round up but you can play with it and experiment.

@echo off
:begin
color 0b
MODE CON:COLS=15 LINES=3
for /F "tokens=10 delims=ms=," %%a in ('ping -n 1 -w 1000 -l 1024 8.8.8.8^| find "Average"') do set "A1=%%a"
set /a T=%A1%
set /a varia=1000/%T%
set /a answer=%varia%
set /a varia2=%answer%
set /a answer2=%varia2%
echo.
echo  Speed %answer2% Kb/s
sleep 5
goto begin
Rump answered 5/5, 2014 at 9:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.