Hello,
I couldn’t really find any relevant or similar issues in these forums, on the QubesOS Reddit or the GitHub issues register so thought to ask the question here before creating a GitHub issue.
Machine is a Lenovo Thinkpad P1 (Gen 4) running QubesOS 4.1.0-rc2.
“sys-usb” is running in HVM mode, has 1GB - 2GB of memory with the “memory balancing” option enabled and has the USB controllers assigned to it.
dom0:00_0d.0 USB controller: Intel Corporation Tiger Lake-H Thunderbolt 4 USB Controller sys-usb (no-strict-reset=True)
dom0:00_0d.2 USB controller: Intel Corporation Tiger Lake-H Thunderbolt 4 NHI #0 sys-usb (no-strict-reset=True)
dom0:00_0d.3 USB controller: Intel Corporation Tiger Lake-H Thunderbolt 4 NHI #1 sys-usb (no-strict-reset=True)
dom0:00_14.0 USB controller: Intel Corporation Tiger Lake-H USB 3.2 Gen 2x1 xHCI Host Controller sys-usb (no-strict-reset=True)
I’ve been experiencing really slow USB read/write speeds. It’s been happening since day #1 and I first noticed it just copying files to and from USB drives (directly accessed via sys-usb). I’ve been using DD as a benchmark to test read/write and here’s what I’m seeing:
user@sys-usb ~]$ sudo dd if=/dev/sda of=/dev/null bs=1M count=1024 conv=fsync status=progress
1071644672 bytes (1.1 GB, 1022 MiB) copied, 96 s, 11.2 MB/s
dd: fsync failed for '/dev/null': Invalid argument
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 96.2545 s, 11.2 MB/s
[user@sys-usb ~]$ sudo dd if=/dev/zero of=/dev/sda bs=1M count=1024 conv=fsync status=progress
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 104 s, 10.3 MB/s
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 114.937 s, 9.3 MB/s
If I change sys-usb to be a PV, the results improve a bit:
[user@sys-usb ~]$ sudo dd if=/dev/sda of=/dev/null bs=1M count=1024 conv=fsync status=progress
1067450368 bytes (1.1 GB, 1018 MiB) copied, 13 s, 82.1 MB/s
dd: fsync failed for '/dev/null': Invalid argument
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 13.156 s, 81.6 MB/s
[user@sys-usb ~]$ sudo dd if=/dev/zero of=/dev/sda bs=1M count=1024 conv=fsync status=progress
1065353216 bytes (1.1 GB, 1016 MiB) copied, 21 s, 50.7 MB/s
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 46.0618 s, 23.3 MB/s
Booting into a Linux LiveUSB environment (SystemRescueCD), gives the results I would normally expect to see and suggests that it’s unlikely to be a hardware issue:
dd if=/dev/sdb of=/dev/null bs=1M count=1024 conv=fsync status=progress
..
<ommitted> 105 MB/s
dd if=/dev/zero of=/dev/sdb bs=1M count=1024 conv=fsync status=progress
...
<ommitted> 29.7 MB/s
Is there a tweak or a hack that I’m missing here?
Thanks for your help.