What's new

simple way to measure throughput - linux

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

keratos

Guest
I used iftop to measure throughput between a wireless client and my router , whilst sending a 2GB file from wifi client to the router's USB hard drive.

I get a figure af around 18MBps on a 802.11n connection with no other clients connected.

Is iftop a quick and dirty way of determining throughput or is there a better tool?
 
I used iftop to measure throughput between a wireless client and my router , whilst sending a 2GB file from wifi client to the router's USB hard drive.

I get a figure af around 18MBps on a 802.11n connection with no other clients connected.

Is iftop a quick and dirty way of determining throughput or is there a better tool?

There are numerous tools. Personally I use either Lanbench (Windows) or iperf (Windows/Linux).

Doing any disk-based test might hit a bottleneck introduced by the USB interface, so if you want to measure network throughput, this isn't a good way. Best to run test tools on two separate computers - I usually run tests between my wireless laptop and my wired desktop. Running one of the endpoint on the router is again a bad idea, as the router's CPU will affect throughput.
 
it's a good point Merlin. However, ...

my LAN is principally a home theatre hub on which exist several media boxes (Sat Box, Freeview box, NAS, USB-Router drive). I stream media from any given device to a renderer (PC, Laptop, TV, Android, iPhone, iPad). So ultimately the performance of the network is ostensibly a measure of the user experience when watching media (TV, Movies) - i.e: startup time, playback quality, forward/rewind speed, time search.

So measuring throughput to/from device<>rednderer (router hosted USB to a laptop) or indeed any other device is ultimately going to drive my network configuration decisions. Hence also decision to opt for the 56U rather than the 66U or 68U which potentially have further reach/throughput but do not possess USB3 for the media store (DLNA). For me, max MBs is more important than signal reach or strength although granted as attenuation increases throughput will reduce by virtue of reduced link speed , however at any given distance if the MBps media throughput is sufficient I "dont care" what the attentuation is . "quite logical, Captain" - spock :)

I currently get around 17MBps on 802.11n (ac adapters arriving soon). so I'm expecting around 24-28Mbps on 802.11ac which is more than sufficient to stream a couple of HD movies throughout the LAN me thinks?

However, if there is a better way, prey tell .... ?
 
Last edited:
Personally I prefer the approach where one cuts down variables to the smallest number at one time. Rather than testing the whole wifi + sharing performance at the same time, I recommend first testing just wired to wifi performance, optimizing that bit. Once that is done, then focus on optimizing SMB/DLNA performance over wifi. Fewer variables will make it easier to optimize.
 
Personally I prefer the approach where one cuts down variables to the smallest number at one time. Rather than testing the whole wifi + sharing performance at the same time, I recommend first testing just wired to wifi performance, optimizing that bit. Once that is done, then focus on optimizing SMB/DLNA performance over wifi. Fewer variables will make it easier to optimize.

Ive turned off DLNA and SAMBA - too slow. FTP xfer is much faster.

Something isnt right though because I'm right next to the router and have a link speed of 300mpbs (max) so even at half that, 150mbps, I should be getting around 17MBps to the USB drive , but I get around 9MBps. Ridiculous. Whith a wired connection the xfer to USB is still only 35MBps (just now). Well below the 3Gpbs standard. The USB stack would seem a poor performance coupled with poor wifi performance.

The DDWRT firmware gives around 75MBps wired xfer to USB so there is definitely something in the firmware that is different; alas wirelessly, the DDWRT f/w gives around 5MBps !
 
Ive turned off DLNA and SAMBA - too slow. FTP xfer is much faster.

Something isnt right though because I'm right next to the router and have a link speed of 300mpbs (max) so even at half that, 150mbps, I should be getting around 17MBps to the USB drive , but I get around 9MBps. Ridiculous. Whith a wired connection the xfer to USB is still only 35MBps (just now). Well below the 3Gpbs standard. The USB stack would seem a poor performance coupled with poor wifi performance.

The DDWRT firmware gives around 75MBps wired xfer to USB so there is definitely something in the firmware that is different; alas wirelessly, the DDWRT f/w gives around 5MBps !

Link speed will never be close to actual throughput. That link speed doesn't take into account encryption overhead, wifi packet management, retransmissions, and so on. A 300 Mbps link should give you around 120-150 Mbps of real throughput, which amounts to roughly 9-12 MB/s of USB transfer rate.

You will never get NAS performance out of a router that was designed for routing traffic. The USB controller isn't optimized, and the router's 800 MHz CPU just won't cut it.

I highly doubt you are getting 75 MB/s of USB performance with DD-WRT. Anything above 30 MBps is considered to be good with those low-powered routers. The top performance measured so far is about 55 MB/s with an R7000 (the just-released WRT1900AC might be able to beat that however). This is obviously with a wired connection.

Of all those methods (SMB, DLNA, FTP), DLNA is the fastest, as it was optimized for streaming, and ofers the least amount of protocol overhead. Closest thing to DLNA in performance would be NFS.
 
Merlin, if I could video the stats I would - 70MB read from the USB - period.

I'm a s/w engineer although 1553/3910 optical bus and ADA language; not linux/C so no experience in programming TCP/IP,C,or clib and ANSI C libraries. But I do know the theoretics around throughput and know how to use linux. 70MBps is the PEAK figure monitoring the wlan1 interface and IP traffic between two nodes.
I agree with you, 300Mbps is going to be more like 150 (perhaps 120 due to competing channels/conjestion, and header info in protocols and app layers).

DLNA is streaming at 652Kbps whereas FTP is providing the data at around 8MBps. DLNA not good.
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top