Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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)

share|improve this question
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

2 Answers 2

up vote 0 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

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.