3

Using Kubuntu 22.04.1

At back of desktop computer there are two blue USB ports with Type-A connectors.

Theoretical speed command 1:

lsusb -t

Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 20000M/x2

Theoretical speed command 2:

cat /sys/bus/usb/devices/usb2/speed

20000 = 20000 Mbps = 20 Gbps

No USB device I have operates at 20 Gbps.

How to measure USB port real-world speed? Not USB device speed

Reference: USB 3.2 Speed Comparison & Real-world Performance

1 Answer 1

3

lsusb returns the theoretical maximum speed of the port, not of any device that is connected to it.

For how to measure real-world speed, see the post How do I find out USB Speed from a terminal?

Below is the answer by noffle :

The pv tool allows you to view the throughput of the data flowing through it. After installing the package, you could run a command like the following to see the write rate:

$ cat /dev/zero | pv > /media/some_usb/tmp123

203.1MiB 0:00:02 [100.2MiB/s] [ <=>                   ]

For reading, perform the opposite operation using the newly-created tmp123 file:

$ cat /media/some_usb/tmp123 | pv > /dev/null

Another idea was to use gnome-disks in terminal using its GUI interface : Click the disk you want to test -> Device Options -> Benchmark Disk -> Start Benchmark.

See the linked post for more information.

5
  • Intead of using a temp file just use /dev/sdX to read the raw block device (which also may avoid some caching issues). Also, you can bypass cat by using pv < /dev/sdX > /dev/null Don't do this for the read test unless you are willing to repartition and reformat your disk afterwards. Also, you need to run the test a while to mitigate caching effects.
    – davidgo
    Nov 23, 2022 at 18:15
  • pv 1.6.6 was installed this command below appears to be device related cat /dev/zero | pv > /media/x/some_usb/file.txt but my interest was port related speed not device related speed. For example the Reference Link says 20 Gbps theory and 16 Gbps real world. My USB port say 20 Gbps theory. How to measure USB port real-world speed? not device speed, not file speed.
    – joseph22
    Nov 23, 2022 at 19:23
  • Real-world speed must be measured with a real-world device, and will depend on the speed capability of the device. Otherwise, how would you define a real-world speed?
    – harrymc
    Nov 23, 2022 at 19:28
  • That's a good point, but how did they measure real-world 16 Gbps = 16000 Mbps? See web page USB 3.2 Speed Comparison & Real-world Performance. Was RAM involved? Was it a dynamic RAM drive?
    – joseph22
    Nov 23, 2022 at 19:59
  • I see this in your link : "To illustrate how fast USB 3.2 Gen 2×1 (10Gbps) is in real-world scenarios, we compared the speed of five USB SSDs in the bar graph below". They used fast USB devices.
    – harrymc
    Nov 23, 2022 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.