USB 3.0 speed test external hard Drive (Vm VS host) - Passthrough USB 3.0 Controller

cooper512

New Member
Dec 30, 2022
1
0
1
Hi Everyone,


I am able to PCI passthrough the USB 3.0 Controller to my virtual machine.

USB 3.0 Controller : 00:15.0 USB controller: Intel Corporation Celeron/Pentium Silver Processor USB 3.0 xHCI Controller (rev 03)
Proxmox machine : asrock j5005-itx 8GB DDR4
USB Portable Drive : Seagate Basic Portable Drive 4TB (ext4)
OS VM : Debian 11 without GUI (netinstall iso)

root@pve:~# lsusb Bus 002 Device 002: ID 0bc2:aa14 Seagate RSS LLC STJ4000400 [Seagate Basic Portable Drive 4TB] Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@pve:~# lspci 00:00.0 Host bridge: Intel Corporation Gemini Lake Host Bridge (rev 03) 00:00.1 Signal processing controller: Intel Corporation Celeron/Pentium Silver Processor Dynamic Platform and Thermal Framework Processor Participant (rev 03) 00:02.0 VGA compatible controller: Intel Corporation GeminiLake [UHD Graphics 605] (rev 03) 00:0e.0 Audio device: Intel Corporation Celeron/Pentium Silver Processor High Definition Audio (rev 03) 00:0f.0 Communication controller: Intel Corporation Celeron/Pentium Silver Processor Trusted Execution Engine Interface (rev 03) 00:12.0 SATA controller: Intel Corporation Celeron/Pentium Silver Processor SATA Controller (rev 03) 00:13.0 PCI bridge: Intel Corporation Gemini Lake PCI Express Root Port (rev f3) 00:13.1 PCI bridge: Intel Corporation Gemini Lake PCI Express Root Port (rev f3) 00:13.2 PCI bridge: Intel Corporation Gemini Lake PCI Express Root Port (rev f3) 00:13.3 PCI bridge: Intel Corporation Gemini Lake PCI Express Root Port (rev f3) [B]00:15.0 USB controller: Intel Corporation Celeron/Pentium Silver Processor USB 3.0 xHCI Controller (rev 03)[/B] 00:1f.0 ISA bridge: Intel Corporation Celeron/Pentium Silver Processor LPC Controller (rev 03) 00:1f.1 SMBus: Intel Corporation Celeron/Pentium Silver Processor Gaussian Mixture Model (rev 03) 01:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 01:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15) 04:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02) root@pve:~#

My VM config :
root@pve:~# qm config 101 boot: order=scsi0;ide2;net0 cores: 3 hostpci0: 0000:00:15.0,pcie=1 ide2: local:iso/debian-11.6.0-amd64-netinst.iso,media=cdrom,size=388M machine: q35 memory: 4096 meta: creation-qemu=7.1.0,ctime=1672270316 name: serveur1 net0: virtio=E2:B5:42:3C:10:F2,bridge=vmbr0,firewall=1 numa: 0 onboot: 1 ostype: l26 scsi0: local-zfs:vm-101-disk-0,iothread=1,size=16G scsihw: virtio-scsi-single smbios1: uuid=d6d08589-19b2-47d9-a131-0091bf08e926 sockets: 1 vmgenid: 35664ff8-5dfe-4d08-a4a0-371cf47ec5e1

Proxmox VE version :
root@pve:~# pveversion -v proxmox-ve: 7.3-1 (running kernel: 5.15.74-1-pve) pve-manager: 7.3-3 (running version: 7.3-3/c3928077) pve-kernel-5.15: 7.2-14 pve-kernel-helper: 7.2-14 pve-kernel-5.15.74-1-pve: 5.15.74-1 ceph-fuse: 15.2.17-pve1 corosync: 3.1.7-pve1 criu: 3.15-1+pve-1 glusterfs-client: 9.2-1 ifupdown2: 3.1.0-1+pmx3 ksm-control-daemon: 1.4-1 libjs-extjs: 7.0.0-1 libknet1: 1.24-pve2 libproxmox-acme-perl: 1.4.2 libproxmox-backup-qemu0: 1.3.1-1 libpve-access-control: 7.2-5 libpve-apiclient-perl: 3.2-1 libpve-common-perl: 7.2-8 libpve-guest-common-perl: 4.2-3 libpve-http-server-perl: 4.1-5 libpve-storage-perl: 7.2-12 libspice-server1: 0.14.3-2.1 lvm2: 2.03.11-2.1 lxc-pve: 5.0.0-3 lxcfs: 4.0.12-pve1 novnc-pve: 1.3.0-3 proxmox-backup-client: 2.2.7-1 proxmox-backup-file-restore: 2.2.7-1 proxmox-mini-journalreader: 1.3-1 proxmox-widget-toolkit: 3.5.3 pve-cluster: 7.3-1 pve-container: 4.4-2 pve-docs: 7.3-1 pve-edk2-firmware: 3.20220526-1 pve-firewall: 4.2-7 pve-firmware: 3.5-6 pve-ha-manager: 3.5.1 pve-i18n: 2.8-1 pve-qemu-kvm: 7.1.0-4 pve-xtermjs: 4.16.0-1 qemu-server: 7.3-1 smartmontools: 7.2-pve3 spiceterm: 3.2-2 swtpm: 0.8.0~bpo11+2 vncterm: 1.7-1 zfsutils-linux: 2.1.6-pve1 root@pve:~#

iommu group :
root@pve:~# ./lsiommu IOMMU Group 0 00:00.0 Host bridge [0600]: Intel Corporation Gemini Lake Host Bridge [8086:31f0] (rev 03) IOMMU Group 0 00:00.1 Signal processing controller [1180]: Intel Corporation Celeron/Pentium Silver Processor Dynamic Platform and Thermal Framework Processor Participant [8086:318c] (rev 03) IOMMU Group 1 00:02.0 VGA compatible controller [0300]: Intel Corporation GeminiLake [UHD Graphics 605] [8086:3184] (rev 03) IOMMU Group 2 00:0e.0 Audio device [0403]: Intel Corporation Celeron/Pentium Silver Processor High Definition Audio [8086:3198] (rev 03) IOMMU Group 3 00:0f.0 Communication controller [0780]: Intel Corporation Celeron/Pentium Silver Processor Trusted Execution Engine Interface [8086:319a] (rev 03) IOMMU Group 4 00:12.0 SATA controller [0106]: Intel Corporation Celeron/Pentium Silver Processor SATA Controller [8086:31e3] (rev 03) IOMMU Group 5 00:13.0 PCI bridge [0604]: Intel Corporation Gemini Lake PCI Express Root Port [8086:31d8] (rev f3) IOMMU Group 6 00:13.1 PCI bridge [0604]: Intel Corporation Gemini Lake PCI Express Root Port [8086:31d9] (rev f3) IOMMU Group 7 00:13.2 PCI bridge [0604]: Intel Corporation Gemini Lake PCI Express Root Port [8086:31da] (rev f3) IOMMU Group 8 00:13.3 PCI bridge [0604]: Intel Corporation Gemini Lake PCI Express Root Port [8086:31db] (rev f3) IOMMU Group 9 00:15.0 USB controller [0c03]: Intel Corporation Celeron/Pentium Silver Processor USB 3.0 xHCI Controller [8086:31a8] (rev 03) IOMMU Group 10 00:1f.0 ISA bridge [0601]: Intel Corporation Celeron/Pentium Silver Processor LPC Controller [8086:31e8] (rev 03) IOMMU Group 10 00:1f.1 SMBus [0c05]: Intel Corporation Celeron/Pentium Silver Processor Gaussian Mixture Model [8086:31d4] (rev 03) IOMMU Group 11 01:00.0 Ethernet controller [0200]: Intel Corporation 82576 Gigabit Network Connection [8086:10c9] (rev 01) IOMMU Group 12 01:00.1 Ethernet controller [0200]: Intel Corporation 82576 Gigabit Network Connection [8086:10c9] (rev 01) IOMMU Group 13 03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15) IOMMU Group 14 04:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 02) root@pve:~# cat lsiommu #!/bin/bash for d in $(find /sys/kernel/iommu_groups/ -type l | sort -n -k5 -t/); do n=${d#*/iommu_groups/*}; n=${n%%/*} printf 'IOMMU Group %s ' "$n" lspci -nns "${d##*/}" done;

In the VM:
serveurdb-1:~$ lspci 00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller 00:01.0 VGA compatible controller: Device 1234:1111 (rev 02) 00:1a.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03) 00:1a.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03) 00:1a.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03) 00:1a.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03) 00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03) 00:1c.0 PCI bridge: Red Hat, Inc. QEMU PCIe Root port 00:1c.1 PCI bridge: Red Hat, Inc. QEMU PCIe Root port 00:1c.2 PCI bridge: Red Hat, Inc. QEMU PCIe Root port 00:1c.3 PCI bridge: Red Hat, Inc. QEMU PCIe Root port 00:1d.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03) 00:1d.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03) 00:1d.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03) 00:1d.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92) 00:1f.0 ISA bridge: Intel Corporation 82801IB (ICH9) LPC Interface Controller (rev 02) 00:1f.2 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (rev 02) 00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02) [B]01:00.0 USB controller: Intel Corporation Celeron/Pentium Silver Processor USB 3.0 xHCI Controller (rev 03)[/B] 05:01.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge 05:02.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge 05:03.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge 05:04.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge 06:03.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon 06:12.0 Ethernet controller: Red Hat, Inc. Virtio network device 09:01.0 SCSI storage controller: Red Hat, Inc. Virtio SCSI serveurdb-1:~$ lsusb Bus 008 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 010 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 009 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 007 Device 002: ID 0bc2:aa14 Seagate RSS LLC STJ4000400 [Seagate Basic Portable Drive 4TB] Bus 007 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


speed test in the host :

root@pve:~# dd if=/dev/zero of=/media/seagateUSB/test01.img bs=1024 count=2000000 2000000+0 records in 2000000+0 records out 2048000000 bytes (2.0 GB, 1.9 GiB) copied, 19.5782 s, 105 MB/s

speed test in the VM :

serveurdb-1:~$ sudo dd if=/dev/zero of=/media/seagateUSB/test01.img bs=1024 count=2000000 2000000+0 records in 2000000+0 records out 2048000000 bytes (2.0 GB, 1.9 GiB) copied, 29.8854 s, 68.5 MB/s


So speed test results : 105 MB/s in the host and only 68.5 MB/s in the VM

Is it normal to have such a drop in performance? (105 vs 68.5)

Is there a way to improve this performance?

This is my first day that I play with Proxmox Virtual Environment...

Thanks in advance for your help.
 
Last edited: