El 9/11/24 a les 4:05, Brett Neumeier ha escrit:
On 11/8/24 1:04 PM, Narcis Garcia wrote:
Can be guest CPU/cores be pinned to host ones, without having to configure complicated mem/memdev parameters at qemu -numa parameter?

I tried to run:
qemu-system-x86_64 -smp sockets=2,cores=2,threads=2 -numa node,cpus=0-5
but it complains about total memory for NUMA nodes (0x0) that should equal RAM size (qemu shows it already knows the size).

On Linux, you can do this using taskset. Something like:

taskset -c 0-5 qemu-system-x86_64 -smp sockets=2,cores=2,threads=2...

will tell the scheduler to run the resulting qemu process only on the first six cores. Does that help?


It seems so.
I've read CPU affinity is useful to reduce core/thread alternance overhead, and this way some guest processes could enhance performance.

My objective is guest has more host CPU time;
I currently see guest can be reporting 100% CPU usage while Qemu host is reporting 30% CPU usage, and this indicates to me hardware is not being used as it could.

--
Narcis Garcia

Reply via email to