Results 1 to 9 of 9

Thread: 14.04 on VirtualBox is slow

  1. #1
    Join Date
    Jul 2006
    Location
    Chicago
    Beans
    403
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    14.04 on VirtualBox is slow

    I currently run 12.04 LTS in VirtualBox and then menus respond rather quickly. But, after installing 14.04 yesterday the menu is quite a bit slower to respond to clicks.
    It works, but man it's slow. I have the VirtualBox display memory cranked up and it still doesn't help. Is there something in Ubuntu (window decorations) that I must turn off now?

    Thanks for any suggestions.

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: 14.04 on VirtualBox is slow

    I haven't tried 14.04 desktop under virtualbox, but http://blog.jdpfu.com/slowVbox has worked in prior releases since Unity was made the default.

  3. #3
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: 14.04 on VirtualBox is slow

    So I spent this morning grabbing 14.04 desktop and testing it in vbox. Things sucked until I used a fully-preallocated vHDD. Enabling 3d acceleration helped a tiny bit, but not nearly as much as pre-allocating all the storage first.

    Login:
    * QCOW vHDD - 20 sec
    * VDI Fully Allocated vHDD - 12 sec
    * Prealloc + 3D accel - 10 sec

    Launch firefox:
    * QCOW vHDD - 23 sec
    * VDI Fully Allocated vHDD - 8 sec
    * Prealloc + 3D accel - 6 sec

    I followed the settings at that link for everything else. The box was a gen-1 Core i5 in a laptop with a 7200 spinning HDD on an unencrypted partition.

    Oh - and installation times where crazy different.
    * QCOW vHDD - 50 min
    * VDI Fully Allocated vHDD - 12 min

    I did clone the contents of the QCOW storage into a fully-allocated RAW/VDI file and tested that as well. It matched the post-install to a fully-allocated VDI disk. So we don't need to reinstall anything - just create the vHDD that is desired and clone away. To clone, I boot a liveCD (gparted, but that isn't important), and use sudo dd if=/dev/sda of=/dev/sdb bs=102400. All created disks are 8G - according to virtualbox storage creation routines. I suppose that using vboxmanage would do the same things. I did NOT time the clone commands.

    BTW - every time I shutdown the VM, it crashed. EVERY TIME. Running vbox on Win7 x64 v4.3.10.r????? The gparted ISO did NOT crash.

    So, if there is any question about using sparse or fully-preallocated, I think that has been answered. I'll try using sparse on VDI next out of curiosity. The virtualbox forums claim this doesn't matter and pre-allocation isn't necessary. Perhaps. Give me 20 minutes.
    Last edited by TheFu; April 18th, 2014 at 04:45 PM.

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: 14.04 on VirtualBox is slow

    So - the cloned fully pre-allocated storage into sparse VDI storage performed the same for logins and launching firefox were 12 and 8 seconds. This was with 3d accel enabled, so it is a tiny bit slower.

    Without 3d accel enabled, logins and launching firefox were 13 and 10 seconds, again, a tiny bit slower.

    So - sparse storage, using VDI vHDD files, seems worthwhile. I'm off to do a 14.04 install to new VDI storage.
    Code:
    -rw-rw-rw- 0 root root 4625268736 Apr 18 11:49 New-Sparse-vHDD.vdi
    -rw-rw-rw- 0 root root 8592031744 Apr 18 11:45 New-vHDD.vdi
    -rw-rw-rw- 0 root root 8592031744 Apr 18 10:29 Ubu1404-full.vdi
    -rw-rw-rw- 0 root root 4728557568 Apr 18 10:16 Ubu1404.qcow
    provides an idea of the file sizes.

    Installed again, into a sparse VDI vHDD (no 3d accel)
    * Install - 14 min
    Installed guest additions, rebooted, then did the login/firefox launch
    * login 11 sec
    * firefox 10 sec

    Enabled 3D accel and rebooted:
    * login 9 sec
    * firefox 7 sec

    Tiny bit slower than fully-preallocated.
    Last edited by TheFu; April 18th, 2014 at 06:00 PM.

  5. #5
    Join Date
    Jul 2006
    Location
    Chicago
    Beans
    403
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: 14.04 on VirtualBox is slow

    Unfortunately, I am not very experienced with this so I don't understand most of what you're saying. But, you did mentioned 3D accel - so I decided to go tick that box in VirtualBox and that helped consierably! Without that box checked the menu access was very slow now it's pretty snappy. Not as fast as 12.04 is but decent.

    I didn't do a reinstall what that box ticked I just shut the VM down and selected 3D accel and started it back up.

  6. #6
    Join Date
    Dec 2006
    Beans
    7,349

    Re: 14.04 on VirtualBox is slow

    Quote Originally Posted by cjnkns View Post
    I currently run 12.04 LTS in VirtualBox and then menus respond rather quickly. But, after installing 14.04 yesterday the menu is quite a bit slower to respond to clicks.
    Sounds odd, I have to say on my own setup the response is quite snappy. What sort of resources have you given to your VM? I guess the important ones are:

    1. How many 'Processors' have you allocated?
    2. How much RAM have you allocated to the VM?
    3. How much video memory?


    I think these are the most easily tweakable options that you can manipulate but greater detail can be seen here:

    The HTG Guide To Speeding Up Your Virtual Machines
    http://www.howtogeek.com/124796/the-...tual-machines/

    It helps as well to have a bit of a monster of a machine to start with so that there is plenty to share
    You think that's air you're breathing now?

  7. #7
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: 14.04 on VirtualBox is slow

    Quote Originally Posted by cjnkns View Post
    Unfortunately, I am not very experienced with this so I don't understand most of what you're saying. But, you did mentioned 3D accel - so I decided to go tick that box in VirtualBox and that helped consierably! Without that box checked the menu access was very slow now it's pretty snappy. Not as fast as 12.04 is but decent.

    I didn't do a reinstall what that box ticked I just shut the VM down and selected 3D accel and started it back up.
    The only setting that cannot be easily tweaked post-install is the vHDD being fully preallocated. EVERYTHING else can be changed between VM reboots.
    With a Core2Duo or better, you can get 90% of native performance for non-GUI things - provided you fully preallocate the storage.
    * 1G of RAM
    * 128M of vRAM (for desktops)
    * 8G or more of storage, but less than 20G is smart

    The more you look at the VM settings, the more they will make sense. The default settings DO NOT preallocate storage, so that is likely the main performance slowdown. Sparse VDI files are much, much better than they were 2 yrs ago - much better. If you want the VM to be faster, dump Unity for a lighter GUI like XFCE4 or LXDE. It is 3 minutes to do that, not a reinstall.

    Of course, if the VM storage is on an SSD - forget about preallocation. It doesn't matter.
    Last edited by TheFu; April 21st, 2014 at 01:19 PM.

  8. #8
    Join Date
    May 2014
    Beans
    1

    Re: 14.04 on VirtualBox is slow

    TheFu,

    Can I interpret your results as, "If we don't want to preallocate the full exact size of our harddrive, artificial activities to bloat it to a certain size (through writing and then deleting) will help improving the performance?"

  9. #9
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: 14.04 on VirtualBox is slow

    Quote Originally Posted by Linh_Ngo View Post
    TheFu,

    Can I interpret your results as, "If we don't want to preallocate the full exact size of our harddrive, artificial activities to bloat it to a certain size (through writing and then deleting) will help improving the performance?"
    No, you cannot ... unless using SSDs. With SSDs, do whatever you want.

    Anything other than RAW allocations or partition-pass-thru is slower, usually much slower. I did do some trivial testing with VDI on a Win7 hostOS with 14.04 as a guest. VDI "sparse" was always slower, though only you can decide how much that matters. I posted my result here somewhere. Search.

    It isn't like anyone using virtualbox should be making a VDI file larger than 15-20G anyway. Is that really a big deal? Don't keep large files inside VM storage.

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
  •