Page 1 of 1

Performance issues of Ubuntu guest on new USB

Posted: 1. Sep 2018, 19:47
by DancingQuark
Hello,

Summary
I am having some kind of performance bottleneck(s) when I run a virtualbox Ubuntu image from my new USB on my Ubuntu host. From the hard drive, the image runs fine, but when I copy it to USB and run it, I get lagging.

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:

Code: Select all

        
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 VB to run Ubuntu instance on it.

Another benchmark shows the following:

Code: Select all

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 VM, there are pauses or lags happening. I am attaching a clean VBox log file from a
fresh run to this post (cut beginning part out because of file size restriction on this board).
Based on my research, whenever there is lagging there are a lot of the following messages in VBox.log:

Code: Select all

    
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?
Apart of VBox.log there are errors in dmesg during a run of this VM.

Here is sudo lshw | grep -A26 -B10 Kingston for my USB:

Code: Select all

       *-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
                   serial: 0018F30C083AE231C1339DEE
                   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
                      serial: 0E021381FC31
                      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?
Let me know if you need anymore information.

Thanks