[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Guidelines for allocating system resources for VMs?



[Sat, 14 May 2016 11:35:53 +0000] Albin Otterhäll <gmane@otterhall.com>
wrote:
> Martin Read:
> > On 14/05/16 10:05, Albin Otterhäll wrote:
> >> I want to use virtual machines for my everyday work on my laptop
> >> (with a Intel Core i5-3320M @ 2.60 GHz * 4 and 16GB RAM), using
> >> KVM on Debian as my hypervisor.
> >>
> >> But I can't find any general guidelines for how much system
> >> resources to "give" to a VM. How many logical cores? How much RAM?
> >> Note that the primary OS only should act as a hypervisor.

[...]

Well, the good thing about virtual machines is that you do not need to
really decide this now. Just start with a value you consider useful now
and later add more virtual memory and virtual CPU cores.

For Windows, I'd generally recommend you to expose 4 virtual cores and 6
GiB of RAM, for Linux, I'd go for 4 virtual cores and 4 GiB of RAM.

Apart from the applications you run, it highly depends on the number of
virtual machines running simultaneously. If you only ever run one of
them at once, give all your RAM minus about 1 GiB to them. If you run
some in parallel, distribute your RAM over them (If you use memory
ballooning, you can overcommit carefully).

For Windows, I usually give a bit more RAM than Linux, but it also
depends on what you do inside the VM. On your system, I'd minimally
assign 2 GiB for Linux and 3 GiB for Windows (if you intend to run
more than two VMs at once). Should you only want to run one Windows and
one Linux VM, you might as well give 7 GiB to Linux and 8 to Windows and
adjust as necessary later.

Normally, you can give each VM all of your CPU cores. This will result
in all VMs being able to access the whole computing power and if two
VMs try to access all cores at the same time, they will be scheduled
similar to processes in the OS.

As you can see: There is no clear recommendation -- just try out a few
configurations and settle for what works best :)

HTH
Linux-Fan

-- 
http://masysma.lima-city.de/

Attachment: pgpdvrDzycMhh.pgp
Description: OpenPGP digital signature


Reply to: