0

My question is simple. With the help of virt-manager, can I limit what speed should the VM see and use the CPU at?

The goal is to test a web application if it runs better on more cores, lower speed or less cores, but higher speed with the same load.

Bert
  • 984
  • 1
  • 11
  • 29

1 Answers1

1

No. Efficient CPU limiting is done with quotas on time slices, not emulating a different clock. Either would perform not quite like they would unmodified by the hypervisor.

CPU performance also has many more variables than clock speed, which cannot all be tested on a single socket. Architecture, instruction set, superscalar pipeline, caches, NUMA.

Probably you have your favorite model already, but only testing one is quite limiting. Collect data from all candidate CPU models. Both in the test lab, and from users in production.

Also try both energy saving and performance modes. Those are realistic tweaks to CPU frequency. As a bonus, this test would show if your application performance relies on the higher power clocks.

John Mahowald
  • 30,009
  • 1
  • 17
  • 32
  • Thanks for the answer! Wasn't the one I was hoping for, but this gives me the idea how to move on. – Bert Jan 20 '20 at 09:36