[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: transfer speed data



Andy Smith (12020-12-23):
> "gigabyte" is not a network speed. You probably mean gigabit

No, gigabit is 10³ bits, there is no "per second" involved either.

Anyway, why would anybody honest want to use this kind of unit to
measure an actual speed is beyond me. The only point to speak in
kilo/mega/gigabits per second instead is to make the numbers seem larger
to attract clueless customers. Moreover, the ratio between these numbers
and the actual useful network speed is not eight at one might believe,
because they measure below the low-level network protocols.

To express a network speed, use bytes per second at the IP level,
because this is what is useful for administrators and users. And to
avoid all ambiguousness, call them octets per second, because byte and
bit are too similar.

To measure it on the same network, we can use:

10.0.1.2 ~ $ socat - udp-listen:1234 < /dev/zero

10.0.1.3 ~ $ {echo;sleep 100} | socat udp:10.0.1.2:1234 - | pv > /dev/null
2.21GiB 0:00:20 [ 113MiB/s] [                  <=>                             ]

Yes, 113 mega-octets per second seems right for this kind of link.

Beware: do not use this on an asymmetrical network. I tried to measure
the bandwidth of a DSL line using a very fast server as peer, and the
network immediately went down, I believe I triggered some kind of flood
protection at the ISP. For this case, rely on TCP flow control, even if
it adds a little overhead:

socat - tcp-listen:1234,reuseaddr=1 < /dev/urandom

53.5MiB 0:00:25 [2.16MiB/s]

(Using /dev/urandom instead of /dev/zero to avoid possible illusory
boosts from transparent compression somewhere; but /dev/urandom could be
CPU-bound on a fast network.)

Or we can just download something from a public server that we know is
very fast:

Length: 783548416 (747M) [application/octet-stream]
Saving to: ‘/dev/null’

/dev/null            21%[===>                ] 157.25M  71.4MB/s

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: PGP signature


Reply to: