3

With KVM, what is the best way to provide the highest possible performance to all VMs?

The host has a hexa-core processor and 64GB of ram. 3-4 VMs should run on it.

The VMs are idle a lot of the time, but during performance peaks they should preferably have the full performance of the host available.

Is it a good idea to give all VMs 6 cores and 64GB of ram? Or what would make the most sense?

Josc
  • 31
  • 1
  • 1
    There is no best. The most predictable is not using over provisioning, then each guest can always use all resources it is assigned without impacting the other guests. When you do use over provisioning (the total resources allocated to all VM's combined exceed the physical resources in the hypervisor) there may be resource contention between the VM's when the load increases. That might never be an issue for you, for example when peak loads never coincide and all applications in the VM's are well behaved and release all resources they don't immediately need. – Rob May 09 '22 at 09:53
  • Alternatively, your peak loads coincide and are applications come to grinding halt when you (heavily) overcommit memory and cpu allocations. There is often no way to tell beforehand and you will need to test that. – Rob May 09 '22 at 09:57
  • Does this answer your question? [Can you help me with my capacity planning?](https://serverfault.com/questions/384686/can-you-help-me-with-my-capacity-planning) – Nikita Kipriyanov May 09 '22 at 16:02

2 Answers2

3

Good read:
Can you help me with my capacity planning?

Before you deploy production services you will need to understand their usage profile and any interactions that could be detrimental to the performance of the sum of the parts in a virtualized environment.

Your best bet for performance is to run benchmarks and right-size your VMs. If your hardware doesn't allow you to right-size all VMs, purchase more hardware. And remember that downtime is expensive: Your investment should include a viable failover plan for when a host dies.

Mikael H
  • 4,868
  • 2
  • 8
  • 15
0

As a best practice, we never allow allocation of more than 80 percent of hardware resources of the physical machine to all the virtual machines combined. The usage of these resources is monitored over time. In case, the virtual machines start utilizing 80 per cent of resources allocated to them, the options of tuning and adding capacity are considered.

Abhi
  • 1
  • That only works when you have no VM's that are compute instances. I run VM's, i.e., that are programmed to use up 100% of the CPU allocated to them. This is ok - I do not over allocate them as total (so the machine is good), but seeing a CPU on one of them at 100% means it gets all the data it needs and processed it as fast as possible. I.e. video transcoding are such scenarios. There is no general answer to this question. – TomTom May 18 '22 at 15:51
  • Apologies as I did not make myself clear. The idea is to reserve at least 20 per cent hardware resources in the pool to address any high impact issues while additional capacity is procured. – Abhi May 20 '22 at 16:45