Sample Header Ad - 728x90

USB speed bottlenecks (specifically while running virtual machine)

1 vote
2 answers
2195 views
This question is mostly about USB performance on Linux, but more specifically performance issues when running virtualbox images off of my USB. I posted this on the virtualbox forum, but so far no one has helped me. **Details** I bought a new Kingston HyperX Savage 512 GB 3.1 USB stick. I copied a 150 GB file on it, verified the hash and it passed. I also verified the speed using: time $(sudo dd if=/dev/zero of=/home/host/mnt/testfile2 bs=1M count=1000 & sync) 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB, 1000 MiB) copied, 3.69425 s, 284 MB/s real 0m3.883s user 0m0.002s sys 0m0.002s Other time it would be around 110 MB/s, but still I think performance is good enough for VirtualBox to run Ubuntu instance on it. Another benchmark shows the following: sudo hdparm -Tt /dev/sdd1 /dev/sdd1: Timing cached reads: 21882 MB in 1.99 seconds = 10973.39 MB/sec Timing buffered disk reads: 1204 MB in 3.00 seconds = 400.74 MB/sec What happens is that when I start the VirtualBox, there are pauses or lags happening. A virtual box log of a fresh start and shutdown is located at: https://pastebin.com/iC7kQ54J (cut beginning part out because it was too long). Based on my research, whenever there is lagging there are a lot of the following messages in VBox.log: 00:07:10.988753 AsyncCompletion: Task 0x007f65495ff9c0 completed after 16 seconds 00:07:17.981513 AsyncCompletion: Task 0x007f65495ffe80 completed after 23 seconds 00:07:17.989714 AsyncCompletion: Task 0x007f65495ff7c0 completed after 23 seconds 00:07:18.004043 AsyncCompletion: Task 0x007f65495ffec0 completed after 23 seconds 00:07:18.009427 AsyncCompletion: Task 0x007f65495fffc0 completed after 23 seconds 00:07:18.065390 AsyncCompletion: Task 0x007f65495ffd80 completed after 23 seconds 00:07:18.065474 AsyncCompletion: Task 0x007f65495ff840 completed after 23 seconds After googling around, it seems people are saying this has to do with I/O on the drive, but how can that be the case if I get a good performance on the drive during benchmarks? Am I bench marking wrong? Can you suggest a better method? Are there any other parameters which might be disabled which are causing virtual-box to have performance issues with my USB? There are no errors in dmesg on the host during a run of this virtual machine. Here is sudo lshw | grep -A26 -B10 Kingston for my USB: *-usb:1 description: Mass storage device product: HyperX Savage vendor: Kingston physical id: 6 bus info: usb@4:6 logical name: scsi8 version: 1.00 capabilities: usb-3.10 scsi emulated scsi-host configuration: driver=usb-storage maxpower=896mA speed=5000Mbit/s *-disk description: SCSI Disk product: HyperX Savage vendor: Kingston physical id: 0.0.0 bus info: scsi@8:0.0.0 logical name: /dev/sdd version: PMAP size: 468GiB (503GB) capabilities: removable configuration: ansiversion=6 logicalsectorsize=512 sectorsize=512 *-medium physical id: 0 logical name: /dev/sdd size: 468GiB (503GB) capabilities: partitioned partitioned:dos configuration: signature=6e13cd5d *-volume description: EXT4 volume vendor: Linux physical id: 1 logical name: /dev/sdd1 logical name: /home/host/mnt version: 1.0 serial: e953210a-43c2-4ba9-87ec-55ed8ab3c6ff size: 468GiB capacity: 468GiB capabilities: primary journaled extended_attributes large_files huge_files dir_nlink recover 64bit extents ext4 ext2 initialized configuration: created=2018-09-01 00:55:53 filesystem=ext4 label=datapartition lastmountpoint=/home/host/mnt modified=2018-09-01 12:50:22 mount.fstype=ext4 mount.options=rw,relatime,data=ordered mounted=2018-09-01 12:50:22 state=mounted Can anyone tell what could be the problem?
Asked by PurpleLizard (11 rep)
Sep 4, 2018, 03:12 AM
Last activity: May 27, 2025, 11:04 AM