Results 1 to 9 of 9

Thread: Extremely peculiar behaviour on Ubuntu VM

  1. #1
    Join Date
    Jun 2018
    Beans
    4

    Unhappy Extremely peculiar behaviour on Ubuntu VM

    Hello everyone,

    I have been experiencing an extremely peculiar behaviour with my VM's running on Virtual Box. The host is Windows 7 machine, fresh install). I have a fresh VB install and fresh Ubuntu image 18.04. The settings are as follows:


    4 CPU cores, PAE/NX enabled (I am running Intel Xeon E5 2640 v4 with 10 cores on the host)


    4 GB of ram (out of 32 GB on host)


    VT-x + Nested Paging enabled


    50 GB fixed storage allocation, using SATA controller, HOST I/O cache enabled, "solid state drive" ticked (I have two 500 GB Samsung 850 Evo SSD's in AHCI mode on the host)




    The problem is that it barely works. Every third time I try to boot it, it freezes on the "Ubuntu" loading screen, forcing me to power off the machine. When it boots, it's extremely slow. It's slow in a sense that when I type in a wrong command in the terminal, it takes ~30 seconds for the system to recognize the command as wrong and say "command not found". Using apt-get install fetches the files very quickly, but the unpacking part takes ages, maybe ~1 minute per a file to unpack, totaling in 20 minutes to install php5, which is a 25mb package. The GUI is very responsive. It seems like it's just any drive I/O operation is being slow. However, my I/O speed and usage tests say otherwise - I/O usage is at 0-1% in System Monitor. Running
    Code:
    sudo hdparm -Tt /dev/sda
    gives "Timing cached reads" 9363 MB/sec, "Timing buffered disk reads" 1192 MB/sec.


    I have tried reinstalling VB, reinstalling the host OS, creating a new image from scratch, importing an image. My friend has an identical hardware and software setup, he doesn't have this issue. It only started happening recently and I honestly have no idea about what's going on, I am out of ideas.


    Any advice or suggestion is more than welcome!

    P.S I am installing a new image right now, the minimal version has taken 4 hours so far, and it's still installing.. Is it a VB's or my system's fault?

  2. #2
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Extremely peculiar behaviour on Ubuntu VM

    Moved to Virtualisation for a more appropriate fit.
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

  3. #3
    Join Date
    Jun 2016
    Beans
    2,825
    Distro
    Xubuntu

    Re: Extremely peculiar behaviour on Ubuntu VM

    What VirtualBox version and how did you install it?

    Is something else eating up your host's resources?

    Is there a specific reason you need the VM's virtual disk to be a SSD?
    Xubuntu 22.04, ArchLinux ♦ System76 hardware, virt-manager/KVM, VirtualBox
    If your questions are resolved to your satisfaction, please use Thread Tools > "Mark this thread as solved..."

  4. #4
    Join Date
    Sep 2011
    Location
    Behind you!
    Beans
    1,689
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Extremely peculiar behaviour on Ubuntu VM

    Quote Originally Posted by hypomania2 View Post
    I have been experiencing an extremely peculiar behaviour with my VM's running on Virtual Box. The host is Windows 7 machine, fresh install). I have a fresh VB install and fresh Ubuntu image 18.04.
    Not sure what is going on. Ubuntu Server VMs (no GUI) are working fairly well for me under VirtualBox on Windows 10. The VM behaves about the same on my VMware ESXi servers as it does on my PC via VirtualBox.

    I'm using VirtualBox 5.2.12 and Ubuntu Server 18.04 LTS (alternative ISO, not the "live" ISO)

    LHammonds

  5. #5
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Extremely peculiar behaviour on Ubuntu VM

    I'm running Ubuntu 16.04 on KVM with no issues. Have you tried booting a livecd and seeing if it behaves the same?

    Could also try ye ol dd test:

    Code:
    dd if=/dev/zero of=/tmp/test bs=1M count=10240 oflag=direct
    This is what I get on my 16.04.4 VM on a RAID-1 SSD via KVM:

    Code:
    charles@Titan:~$ dd if=/dev/zero of=/tmp/test bs=1M count=10240 oflag=direct
    10240+0 records in
    10240+0 records out
    10737418240 bytes (11 GB, 10 GiB) copied, 1.89344 s, 5.7 GB/s
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  6. #6
    Join Date
    Jun 2018
    Beans
    4

    Re: Extremely peculiar behaviour on Ubuntu VM

    VB 5.2.12, installed through .exe installer. No particular reason for it being an SSD, I thought that would optimize performance.

    Anyway, I fixed the problem by "Use host I/O cache" on the SATA controller.

  7. #7
    Join Date
    Jun 2018
    Beans
    4

    Re: Extremely peculiar behaviour on Ubuntu VM

    I fixed the problem by "Use host I/O cache" on the SATA controller, must dislike the dual SSD setup

  8. #8
    Join Date
    Jun 2018
    Beans
    4

    Re: Extremely peculiar behaviour on Ubuntu VM

    Saved the command

    Insane speed though, I am not getting anything above 450 MB/s

  9. #9
    Join Date
    Sep 2011
    Location
    Behind you!
    Beans
    1,689
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Extremely peculiar behaviour on Ubuntu VM

    Good to know hypomania2.

    Was also curious about the ye old dd test on my servers...but one test would not yield accurate results since there are many VMs in use so I ran it multiple times and on different versions.

    Ubuntu Server 16.04.4 LTS on VMware ESXi (SAS RAID5) (shared by many VMs)
    Command:
    Code:
    dd if=/dev/zero of=/bak/test bs=1M count=3240 oflag=direct
    Results after multiple runs:
    Code:
    3397386240 bytes (3.4 GB, 3.2 GiB) copied, 17.7719 s, 191 MB/s
    3397386240 bytes (3.4 GB, 3.2 GiB) copied, 14.3560 s, 237 MB/s
    3397386240 bytes (3.4 GB, 3.2 GiB) copied, 18.6472 s, 182 MB/s
    3397386240 bytes (3.4 GB, 3.2 GiB) copied, 17.3100 s, 196 MB/s
    Ubuntu Server 18.04 LTS on VMware ESXi (SAS RAID5) (shared by many VMs)
    Command:
    Code:
    dd if=/dev/zero of=/bak/test bs=1M count=2240 oflag=direct
    Results after multiple runs:
    Code:
    2348810240 bytes (2.3 GB, 2.2 GiB) copied, 18.4878 s, 127 MB/s
    2348810240 bytes (2.3 GB, 2.2 GiB) copied, 11.4518 s, 205 MB/s
    2348810240 bytes (2.3 GB, 2.2 GiB) copied, 9.59828 s, 245 MB/s
    2348810240 bytes (2.3 GB, 2.2 GiB) copied, 9.40841 s, 250 MB/s
    Ubuntu Server 18.04 LTS on a Win10 PC via VirtualBox (SATA) (No other VMs running which means more consistent results)
    Command:
    Code:
    dd if=/dev/zero of=/bak/test bs=1M count=2000 oflag=direct
    Results after multiple runs:
    Code:
    2097152000 bytes (2.1 GB, 2.0 GiB) copied, 31.7891 s, 66.0 MB/s
    2097152000 bytes (2.1 GB, 2.0 GiB) copied, 31.9287 s, 65.7 MB/s
    2097152000 bytes (2.1 GB, 2.0 GiB) copied, 28.8840 s, 72.6 MB/s
    2097152000 bytes (2.1 GB, 2.0 GiB) copied, 28.4221 s, 73.8 MB/s
    LHammonds

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •