SATA3 SSD to USB adapter is very slow in VMs

left4pve

Member
Jul 12, 2021
34
3
13
32
Hey guys,

I'm running Proxmox on my NUC, which doesn't have too much disk space. To be able to run NAS, I attached 256GB SSD, connected by a SATA3-to-USB adapter. When mounting the disk to Proxmox itself, the speed is very promising, around 413MB/s.

root@proxmox:/mnt/usb_disk# dd if=/dev/zero of=16GB bs=16M count=1024 status=progress
16978542592 bytes (17 GB, 16 GiB) copied, 41 s, 414 MB/s
1024+0 records in
1024+0 records out
17179869184 bytes (17 GB, 16 GiB) copied, 41.5631 s, 413 MB/s


However, when the disk is passthrough to the VM as a "USB device" in the hardware, I can only get ~100MB/s. I understand there'll be some performance loss caused by virtualization, but not this much.

myname@NAS:/volumeUSB1/usbshare1-2$ dd if=/dev/zero of=16GB bs=16M count=1024 status=progress
17112760320 bytes (17 GB, 16 GiB) copied, 159 s, 108 MB/s
1024+0 records in
1024+0 records out
17179869184 bytes (17 GB, 16 GiB) copied, 159.662 s, 108 MB/s

Any suggestion on what I can do to increase the disk speed?

P.S., I can't passthrough the whole USB controller some USB devices need to be mounted to other VMs

Thanks!
 
Last edited:
can you post the vm config ?

did you attach as 'usb3' ?
 
@dcsapak Thanks for the reply. Yes I did mount the USB devices as USB3, otherwise the speed cannot even reach 100MB/s.

Here's the configuration of USB device


Screen Shot 2021-12-07 at 5.22.57 PM.png
 
The temporary solution is to:
1. Use ZFS to create a pool on that SSD. (Optional, ext4 also works but zfs provides better management)
2. Mount that pool to a folder like `/mnt/SSD240GB`
3. Add that folder a storage in the PVE frontend -> Data Center -> Storage
4. Create a disk from that storage and attach to the disk as SATA device(other type may also work)
5. Now the speed can reach 300MB/s, which I'm already very happy with