Performance of VirtualBox

Discussions related to using VirtualBox on Solaris hosts.
Post Reply
Rinaldo
Posts: 13
Joined: 15. Sep 2014, 22:01

Performance of VirtualBox

Post by Rinaldo »

Goal: Use virtualbox to compile the JDK on a 32Processor 2.(GHZ machine with 256GB of memory

Environment: VirtualBox running on Solaris 11.1 and 11.2 with Windows 2008 as the Guest OS, FC9 and OEL6u4 with 4.3.20

Results:

Running a build without virtual box is ten times faster.

Compiles are disk intensive and we have threaded parts of the process so it can use multiple CPUS. I have tried many configuration options.
  • all CPUS to one Guest and no other guests
    Ram Disks
    Running the build out of tmpfs
    Turning on the SSD option
    Page sharing
Can you suggest some additional tasks for me to do to get some idea of where the performance issue or issues are?
martyscholes
Posts: 202
Joined: 11. Sep 2011, 00:24
Primary OS: Solaris
VBox Version: PUEL
Guest OSses: Win 7, Ubuntu, Win XP, Vista, Win 8, Mint, Pear, Several Linux Virtual Appliances

Re: Performance of VirtualBox

Post by martyscholes »

Rinaldo,

Virtualization will always be slower, but 10x is a rather large hit. I have noticed that allocating more CPUs to the guest than can fit in one socket can cause significant slowdowns. We have multiple six-core CPUs so we keep the guests to 4 cores or less.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Performance of VirtualBox

Post by mpack »

Rinaldo wrote: Compiles are disk intensive and we have threaded parts of the process so it can use multiple CPUS.
If the process is I/O bound, then why do you expect multiple threads to improve performance?

A VM must save and restore the context of all of the CPU cores assigned to it. If you throw additional cores at a VM that doesn't actually use them then all you get is additional overhead. The VM will slow down, not speed up.

I would also note that if you output a lot of data from a VM then the first time you run it you might see a larger than normal I/O overhead because the dynamic disk is growing with almost every write. Second and subsequent runs should go faster.
Rinaldo wrote: Turning on the SSD option
You mean in VirtualBox? That option is not a performance feature, it has to do with garbage collection. You can't make an hdd give ssd like performance just by setting a dialog option.
Rinaldo
Posts: 13
Joined: 15. Sep 2014, 22:01

Re: Performance of VirtualBox

Post by Rinaldo »

mpack wrote:
Rinaldo wrote: Compiles are disk intensive and we have threaded parts of the process so it can use multiple CPUS.
If the process is I/O bound, then why do you expect multiple threads to improve performance?

I was stating a fact we have a threaded application and we are trying to understand why it is ten times slower on Virtual Box.

A VM must save and restore the context of all of the CPU cores assigned to it. If you throw additional cores at a VM that doesn't actually use them then all you get is additional overhead. The VM will slow down, not speed up.

I would also note that you output a lot of data from a VM then the first time you run it you might see a larger than normal I/O overhead because the dynamic disk is growing with almost every write. Second and subsequent runs should go faster.
Rinaldo wrote: Turning on the SSD option
You mean in VirtualBox? That option is not a performance feature, it has to do with garbage collection. You can't make an hdd give ssd like performance just by setting a dialog option.
I thought it was something sophisticated like take this ram and make it an SSD. Thanks for the clarification.
Rinaldo
Posts: 13
Joined: 15. Sep 2014, 22:01

Re: Performance of VirtualBox

Post by Rinaldo »

martyscholes wrote:Rinaldo,

Virtualization will always be slower, but 10x is a rather large hit. I have noticed that allocating more CPUs to the guest than can fit in one socket can cause significant slowdowns. We have multiple six-core CPUs so we keep the guests to 4 cores or less.
Sorry but this makes no sense, they provide a dial to use more cpus but it has to do with the sockets?
Rinaldo
Posts: 13
Joined: 15. Sep 2014, 22:01

Re: Performance of VirtualBox

Post by Rinaldo »

Installed VirtualBox 5.0 on OL7 and tried to compile some C code, and some java code which normally takes about ten minutes on OL6u4 on a Guest OS of OL6u4 on OL7 and it took more than 4 hours. We are running the same test on Solaris 11.1 and Windows 2012 R2. Is there any type of monitoring we can turn on to determine where we are spending the time. We are pretty sure it is in the IO system but we want to be sure. We are also going to try and remove the disk IO and replace it with another type of file system.

I am not looking for anecdotal responses but statements of fact or measurements about what the costs for various operations are, or some existing process to measure them before I come up with my own.

Rinaldo
Post Reply