Question about limiting KVM cpu usage
Hello, all,
I have what should be a simple question concerning KVM. Is there a
way to limit cpu usage for a KVM guest? In other words, if I am running four guest servers and something on one of them begins to use a ton of cpu, I don't really want it to slow down all the others. Is the only way to do this by limiting it to one cpu core? Granted, I would prefer that it have access to full computing power if no other guest needs it. Thanks for any advice.
Steve Lorimer <slorimer a t kmbc.edu
2008/9/11 Steve Lorimer <[email protected]>:
Quoted 7 lines
Hello, all,
I have what should be a simple question concerning KVM. Is there a way to
limit cpu usage for a KVM guest? In other words, if I am running four guest servers and something on one of them begins to use a ton of cpu, I don't really want it to slow down all the others. Is the only way to do this by limiting it to one cpu core? Granted, I would prefer that it have access to full computing power if no other guest needs it. Thanks for any advice.
You can use standard linux process utilities. Check out nice, ionice and taskset.
nice to set process priority
ionice to set I/O priority
taskset to set CPU affinity
Quoted 11 lines · FinnTux
2008/9/11 Steve Lorimer <[email protected]>:
Quoted 7 lines
Hello, all,
I have what should be a simple question concerning KVM. Is there a way to
limit cpu usage for a KVM guest? In other words, if I am running four guest servers and something on one of them begins to use a ton of cpu, I don't really want it to slow down all the others. Is the only way to do this by limiting it to one cpu core? Granted, I would prefer that it have access to full computing power if no other guest needs it. Thanks for any advice.You can use standard linux process utilities. Check out nice, ionice and taskset.
I think 'cpulimit' is what you really need.
Cristi
Signature · 4 lines
Ing. Cristi Măgherușan, Universitatea Tehnică din Cluj-Napoca Centrul de Comunicații "Pusztai Kalman" Tel. 0264/401247 http://cc.utcluj.ro