cURL / Mailing Lists / curl-users / Single Mail

curl-users

curl statistics are always off by about 5-10%

From: Sven Lanckmans <sven.lanckmans_at_gmail.com>
Date: Mon, 25 Mar 2013 12:05:25 +0100

Hi,

I'm using curl to measure bandwidth performance behind cable modems. Every
result I see is 5-10% below what I would expect. (these tests are in a lab
so I'm sure about allocated bandwidth).

I've set up a local ftp server which has a file with size of 100MB.

The cable modem has an allocated bandwidth of 15,36Mbps download and 512
Kbps upload.

Download test:
/usr/bin/curl -O ftp://pcprobe:pcprobe@homeusers.brutele.be/100MB.dat -o
/dev/null
  % Total % Received % Xferd Average Speed Time Time Time
 Current Dload Upload Total Spent Left Speed
100 95.3M 100 95.3M 0 0 1760k 0 0:00:55 0:00:55 --:--:--
1761k

Upload test:
/usr/bin/curl -T 2MB-1.dat ftp://pcprobe:pcprobe@homeusers.brutele.be
  % Total % Received % Xferd Average Speed Time Time Time
 Current Dload Upload Total Spent Left Speed
100 2048k 0 0 100 2048k 0 60867 0:00:34 0:00:34 --:--:--
26265

1) why is Total and Received showing 95.3M instead of 100M? (looking at the
file that was downloaded I see a 100MB file)
2) the download speed is 1760kBps * 8 / 1000 = 14,08Mbps
3) the upload speed is 60867 * 8 /1000 = 486Kbps

Every time I test this I get the same results and using other modems with
other subscriptions (100Mbps/5Mbps) show the same behaviour.

Is there maybe by default some overhead substracted from the reported
results?

Many thanks,
Sven.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-03-25