Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

If I run 3 VirtualBox machines on a physical server and eventually start a tough data processing on one of them, are there means to make sure the remaining 2 ones are not suppressed? Can I guarantee some minimum resources to a virtual machine and give all the unused resources (as a background priority) to a specific one?

share|improve this question

1 Answer 1

Depending on how you want to approach it, yes - there are several ways. Unfortunately I am not aware of a simple "use no more than 80% of the total CPU resources available even though I allocated all of them to each of the three machines".

Here are three approaches:

Assuming you have a quad-core server, simply allocate one or two virtual processors to each VM. This will ensure that no VM can ever exceed more than 50% of the host CPU capacity.

You could also try using a program like cpulimit if your host operating system supports it. Virtualization these days goes beyond just a simple process so your mileage may vary but it seems to work well.

A slightly more interesting scenario is to use the CPU Hot-Plugging feature of VirtualBox. Unfortunately there is somewhat limited support for it in the various guest operating systems. You could use this to scale up/down dynamically if your environment supports it.

Here is a screenshot for the VM settings showing where the virtual CPU count can be configured:

share|improve this answer
    
"Assuming you have a quad-core server, simply allocate one or two virtual processors to each VM." - simple and obviously-looking as every genius idea! I'll try reading the manual to find how to actually do so. –  Ivan Jul 17 '10 at 7:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.