Answer the question
In order to leave comments, you need to log in
What is the best/fastest way to allocate CPU?
What is the fastest way - to specify in the KVM config a list (numbers) of cores for use by a virtual machine, or simply specify the total number of virtual cores in the system and let the host allocate them as best he can?
Answer the question
In order to leave comments, you need to log in
In the general case - specify the number of cores and let the host allocate them. This is fine.
In a particular case, you may have some clever non-standard reasons to give fixed core numbers. Then you can start KVM via taskset. (But you still have to specify the number of cores, in addition to their numbers. You specify the numbers in the taskset parameters, and the number in the KVM parameters - one does not depend on the other.) As a test, I tried through taskset - yes, it works, but it doesn’t make much sense found. Separate KVM processes still jump on different cores, within the allocated ones. So I see the point only when exactly one core is allocated to a virtual machine, so that it always runs on the same physical core.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question