opened a new thread: USB 3.0 speed slow - I was wrong it is the Ethernet Port--- But now?

lemonbiter

New Member
Sep 3, 2023
21
0
1
Germany
Hi there
I am new to proxmox and no expert to linux at all. So please consider me a child that needs someone to take his hand...
I am using a USB device that is bound directly to a VM that runs openmediavault. Before that I had connected the device on linux directly to the pve as ZFS. In any case the write speed to that disk is only 21-23 MB/s. When I connect the USB Drive to my Windows Computer write speed is 100 MB/s ...
I have read the whole internet and found, there are several people facing this issue, but I could not find a way on my low level of experience to fix it.

Since I connected it both ways (direct USB bound) as SMB share and ZFS to the PVE direct - and speed is the same, I assume the way of connection may not be the issue...
My PM is on the latest NUC 13th generation.
I watched the status of the cores, the network and memory of the Openmediavault and before the PVE... there are no performance issues.
Network, cores and memory turn the thumbs and are bored.

Anyone out there taking my hand?
Thanks

LEM
 
Go to your PVE console and post the ouput of the following command in CODE tags:

Code:
lsusb -t

(If it's not installed, just install with apt install usbutils)
Thanks LnxBil

here is the outcome:

Code:
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/3p, 20000M/x2
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    |__ Port 2: Dev 2, If 0, Class=Mass Storage, Driver=usbfs, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
 
So, the device has the maximum possible speed, that's good. Can you check if you also have a USB3 device emulated inside of your guest OS? If not, the numbers would make sense for an emulated usb 2 controller.
 
So, the device has the maximum possible speed, that's good. Can you check if you also have a USB3 device emulated inside of your guest OS? If not, the numbers would make sense for an emulated usb 2 controller.
mmmh... Sorry... I don't know what you ask ... mea culpa
 
Before that I had connected the device on linux directly to the pve as ZFS. In any case the write speed to that disk is only 21-23 MB/s. When I connect the USB Drive to my Windows Computer write speed is 100 MB/s ...
You need to try as ext4 if Linux guest or ntfs if Win guest, to match your Windows Computer.
 
Can you try lsubs -t inside of the VM and post it in CODE tags?

After realizing there was a typo (ubs instead of usb) :) I got this...

Code:
root@openmediavault:~# lsusb -t
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
root@openmediavault:~#


and my WD is on Bus 03 I assume:
Code:
Bus 003 Device 002: ID 1058:2626 Western Digital Technologies, Inc. My Passport (WDBPKJ)
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
root@openmediavault:~#
 
Last edited:
USB passthrough is not really suitable for low-latency or high-bandwidth devices because of the significant overhead. PCIe passthrough of a whole USB controller might work but that comes with a whole new set of caveats. Maybe usbip could be worth a try? Or maybe your speed issue is something else entirely and someone here knows a fix for it.
 
USB passthrough is not really suitable for low-latency or high-bandwidth devices because of the significant overhead. PCIe passthrough of a whole USB controller might work but that comes with a whole new set of caveats. Maybe usbip could be worth a try? Or maybe your speed issue is something else entirely and someone here knows a fix for it.
Dear leesteken, many thanks for your input. The web is full of people that really suggest exactly that way (openmediavault with passthrough USB) and they all seem to be fine... I guess :)
 
I had the same results as you for my testsetup.
The way I fixed this is by assigning the disk to the vm instead of usb, this way the IO doesn't run though usb-passtrough.
It's not not possible to assign it using the gui but by editing conf file or qm command.

In my case it was this line:
Code:
scsi1: /dev/disk/by-id/usb-Seagate_Expansion_ASDF1234-0:0,backup=0,replicate=0,size=1920383409664

You can check which id's are used in your system with ls /dev/disk/by-id/.
Then add the id to /etc/pve/qemu-server/900.conf assuming 900 is your vm id.
You can skip the backup=0,replicate=0 and size=1920383409664 parts.

Or you can use the qm set 900 -scsi1 /dev/disk/by-id/usb-Seagate_Expansion_ASDF1234-0:0.
You can find more about this in docs:
https://pve.proxmox.com/wiki/Passthrough_Physical_Disk_to_Virtual_Machine_(VM)
 
Last edited:
I had the same results as you for my testsetup.
The way I fixed this is by assigning the disk to the vm instead of usb, this way the IO doesn't run though usb-passtrough.
It's not not possible to assign it using the gui but by editing conf file or qm command.

In my case it was this line:
Code:
scsi1: /dev/disk/by-id/usb-Seagate_Expansion_ASDF1234-0:0,backup=0,replicate=0,size=1920383409664

You can check which id's are used in your system with ls /dev/disk/by-id/.
Then add the id to /etc/pve/qemu-server/900.conf assuming 900 is your vm id.
You can skip the backup=0,replicate=0 and size=1920383409664 parts.

Or you can use the qm set 900 -scsi1 /dev/disk/by-id/usb-Seagate_Expansion_ASDF1234-0:0.
You can find more about this in docs:
https://pve.proxmox.com/wiki/Passthrough_Physical_Disk_to_Virtual_Machine_(VM)
Hi mbosma
many thanks... but this is way over my knowledge... I know it is much to ask for... but would your time allow that you guide me through?

What are the exact steps... I would need a step by step guide ... What is the full command line in my specific case`? Is my setup in OVM than redundant...
I HAVE NO CLUE ON LINUX...
I am a total newby and must ensure to not f... my system up... :)
Thanks
LEM
 
What are the exact steps... I would need a step by step guide ...

1. Get the ID of your disk:
Code:
michael@next-michael:~$ ls /dev/disk/by-id/
dm-name-cryptdata                                                             nvme-eui.002538bb21047659-part2
dm-name-cryptswap                                                             nvme-eui.002538bb21047659-part3
dm-name-data-root                                                             nvme-eui.002538bb21047659-part4
nvme-SAMSUNG_MZVL2512HCJQ-00B00_S675NA0TB15619
Check which one is your usb drive. unplug and run the command to see which one disappeared to know for sure you have the right one.
(make sure your drive is not in use ofcourse)

Note the complete path for that disk-id. Let's in my case take the Samsung Drive:
Code:
/dev/disk/by-id/nvme-SAMSUNG_MZVL2512HCJQ-00B00_S675NA0TB15619
So it's just /dev/disk/by-id/ + your disk name from the command earlier.

2. remove the usb redirection from your vm to prevent redirecting the disk twice.
(Use the gui for that)

3. Add the disk using the following command:
Code:
qm set 900 -scsi1 /dev/disk/by-id/nvme-SAMSUNG_MZVL2512HCJQ-00B00_S675NA0TB15619
The 900 is your vm-id, which should be correct in your case.
-scsi1 is the disk type and port that should be used, since you're only using scsi0 on your vm -scsi1is fine.
Just replace the my Samsung disk with you disk in step one and you should be fine.
The disk will appear in your vm as a normal disk an will be visible in OMV.

In case you want to revert your changes simply remove the disk marked "scsi1" from your vm.

Here's how the hardware tab looks on my machine:
1696422356852.png

Hope this helps!
 
  • Like
Reactions: leesteken
Dear mbosma
many thanks. With the help of my friend - although you were so very kind and listed all steps precisely - we maneged to do all steps you suggested. unfortunatly this has not changed the speed at all.
We first disconnected the device after shut down of OMV, than did everything you mentioned, in the hardware tab the device was listed as your screen above shows... but speed was exactly the same... We have also added a real fast ssd for testing purpsoes to a USB-C connector (different prot inkl. a different cable of course) and ended up with the same speed... I am sad to tell you that it has not worked out for me... :-(
Thanks
LEM
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!