We are trying to do some time benchmarks in the Virtual Machine (VPC) e.g. how long it takes to Windows gets idle after boot.

So far we have not figured out a way how to do the benchmarks accurately because it seems the state of the hosted machine affects the performance of the Virtual Machine. e.g. some times VM boots up in 30 seconds, sometimes in 100 seconds.

Is there any way how to assign set number of resources to VM so it performs in a consistent way? (e.g. like the real machine would do)

  • 2
    I don't think you are asking for something sensible. What is "the real machine" you are referring to? What real machine? Some hypothetical real machine that the virtual machine is supposed to mimic? – David Schwartz Feb 28 '12 at 11:32
  • Real machine - I mean a dedicated hardware to the installed OS. If you restart your PC 20 times in a row, you will get a consistent boot time experience. On VM it seems its not the case – Janusz Feb 28 '12 at 11:51
  • Right, you will get the same number each time. But if you test on ten different real machines, you will get ten different numbers. Since there is no "the real machine" here, there is no "right answer" you're not getting. – David Schwartz Feb 28 '12 at 12:05
  • Yes, I understand that. I am after consistency on one hardware - which is what is important in benchmarks. – Janusz Feb 28 '12 at 12:38

Technically, you can use the Windows task scheduler to limit all processes on your system to certain cores, or modify the virtual machine process' affinity. You could use this to assign every running task (before starting your virtual machine) to a particular CPU core, then assign the VM to another core. Obviously you have no direct control over the task scheduler, but this should make your results much more consistent.

Another way to ensure consistent results is to modify the priority of the virtual machine process itself. You can do this in conjunction with modifying the CPU core affinity, or just let the task scheduler do it's thing and just set the process affinity to High. This should prioritize the virtual machine's execution state over other non-essential system services.

If you use a hyperthreaded CPU, you may want to my answer to this related question. If you need to perform any of these actions via command line or batch file, my answer to this other question.


Not really. Virtual clients share the resources of the host machine. They can be configured to use less resources (ie limit to 1 CPU or the size of available memory) thru the settings properties of each virtual setup, but never more. And none to my knowledge allow you to specify a different CPU. And since they are shared, if other things are going on on the host machine, that would effect your benchmark.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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