-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
throughput measured on usb device seems wrong #6
Comments
Hello @jrsphoto ! Thanks for your tests! I was actually not very confident about the algorithm used for computing the bandwidth, and your results seem to confirm that! Do you have any suggestions/improvements on how the bandwidth measurement should be done? (that is, for instance, at which frequency should we compute it, using which sizes, etc...). Thanks! |
For information, all bandwidth computation related code is happening here: https://github.com/aguinet/usbtop/blob/master/src/usb_stats.cpp ! |
Just like to add that I too think the results are inaccurate. I'm running tests between hosts with iperf using USB-Ethernet dongles. The figures from iperf are:
whilst usbtop is saying around about : Would expect to see something significantly higher than 72Mb/s taking usb overhead into account. |
11270.87 kB/s ~ 90.167 Mbits/s. Does it resolve your doubts? |
I would hazard a guess that its coincidence. The units displayed are kb/s - that's kilo bits per second, and USB throughput is normally measured in bits not bytes, presumably due to being a serial connection. I'll have a look at usb_stats.cpp and see if its a possibility though. |
I've looked at the code (src/usb_stats.cpp and src/console_output.cpp). All the calculations are performed in bytes and bytes per second, no conversion to/from bits is used, only the final conversion from bytes per second to kiB/s (division by 1024.0 in console_output.cpp). |
ah ok, not had a chance to look back at this yet but good to know. Thanks. |
Hi. could you please clarify? |
It's in KiB/s (KiB as in https://en.wikipedia.org/wiki/Kibibyte) |
Thank you. |
It does. Closing this issue. Do notbhesitate to re-open if you have any question! |
I have an RTL-SDR usb sdr receiver, that I've been testing with usbtop to determin how much data its sending over the usb bus. I can use the command rtl_test -s 2.4e6 to tell it to sample at 2.4MHz bandwidth, which should put around 4800kB/s on the usb bus, but I'm only geting 1160kB/sec. In fact, if I change the sample rate to 3.4Mhz, which should peg the usb2 interface, It stays at 1160kB/sec.
I'm on ubuntu 16.04.3 LTS on an i5 processor with 16gb of ram.. Source compiled direct from github and compiled with no errors or warnings.
The text was updated successfully, but these errors were encountered: