Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to run some stresstests on a new long polling technology we're using. To know what the capabilities are, I'd like to run 2 (or maybe more) tests on a VM.

First I'd like to start with for example a CPU of 1 GHz. The second test would be with 2 GHz. When we know the limits (number of concurrent clients) of 1 Ghz and 2 Ghz, we can see how it scales on the hardware (is it lineair with the CPU etc.).

Is it possible to increase/decrease the CPU frequency of a VM in a fast/easy way without physically changing the hardware? I think this should be possible, because many VPS providers allow their clients to dynamically scale their VPS.

share|improve this question
What virtualization technologies are you using ? – Iain May 16 '12 at 12:22
Please go read How to Ask, then come back and give us a complete Question. Thank you. – Chris S May 16 '12 at 12:27
I'm not using any VM yet, all the options are still open. I'm just looking into an fast/easy way to achieve this. – EsTeGe May 16 '12 at 13:00

The answer would depend on the virtualization solution you are employing. Typical resource management concepts include reservations, limits and weighting where limits would probably be what you are looking for.

  • ESXi/vSphere, Xen and OpenVZ/Virtuozzo support them for virtual CPUs.
  • VMWare Server/Workstation/Player and VirtualBox do not
  • KVM is only capable of controlling "shares" or changing the number of cores/CPUs, which would not be useful
  • Hyper-V allows for a relative "percentage" limit of physical CPU resources, which would work out as long as your physical CPU number and frequencies do not change
  • QEmu, being an emulator rather than a virtualization solution, offers speed limiting, but would incur a large amount of overhead for binary translation of the code, so probably would not be an option for performance testing
share|improve this answer

In ESXi and Virtualbox you can modify numbers of cpus. So in some way you can do this but its not excacly what you want. There was something like /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed you could change vaules of cpu frequency by editing only this file but i think that it's no longer supported option (it is not supperted on my Fedora 16)

In fedora repo there is something like cpufrequtils that contains several utilities that can be used to control the cpufreq interface provided by the kernel on hardware that supports CPU frequency scaling. You could try that.

share|improve this answer
Thanks, I'll take a look into that ;) – EsTeGe May 16 '12 at 12:39

Your Answer


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.