On 29/12/2016 07:26, Programmingkid wrote:
There is a program that I run inside of QEMU that doesn't use the virtual CPU very efficiently. It causes QEMU to use 100% of the guest's CPU time. I was wondering if there were a way to reduce the amount of host CPU time that a guest CPU can use? This feature would help prevent laptops from heating up when running QEMU.
Your best option seems to be to lower the priority (with the nice or renice command) of qemu and its kvm child process. It seems that the ulimit/prlimit/setrlimit calls on Linux, despite their versatility, do not provide a setting that gently limits the amount of CPU the scheduler grants to a process.
Of course lowering process priority by increasing its nice value only reduces how much it takes away from other active processes, it cannot cause the CPU to become idle when the nice process says it has work to do. Enjoy Jakob -- Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10 This public discussion message is non-binding and may contain errors. WiseMo - Remote Service Management for PCs, Phones and Embedded