OpenVZ Forum


Home » General » Support » Limiting CPU resources to a VE?
Limiting CPU resources to a VE? [message #35060] Tue, 24 February 2009 17:28 Go to next message
Ubuntu is currently offline  Ubuntu
Messages: 1
Registered: February 2009
Junior Member
Hello

I've searched this forum, I've searched Google, and I can't find a way of limiting the CPU resources available to a VE.

I am in the process of benchmarking native vs. Xen vs. OpenVZ on an Opteron system with 8 cores.

What I want to do is to limit the CPU power in the VE to 2 cores. Doesn't matter which ones.

I have tried this:

vzctl set 101 --save --cpulimit 200
(has no effect)

vzctl set 101 --save --cpus=2
(again has no effect)

When I say it does not work, when I run a benchmark in the VE I am getting the same performance I would if I run it natively on the system with all 8 cores available. i.e. it is running too fast, proving that I am not limited to the power of 2 cores.

My benchmark is multi-core aware.

How do I limit the CPUs in the VE to the equivalent of 2 processor cores?

When I start the VE I get this:

Setting CPU limit: 0
Setting CPU units: 1000
Setting CPUs: 2


However, in the VE, when I have a look at /cat/proc/cpuinfo there are 8 processors there. And as I say, I'm getting performance associated with the native machine.

I'm using Ubuntu 8.04 for the OpenVZ host, kernel is 2.6.24.

Thanks
Re: Limiting CPU resources to a VE? [message #35072 is a reply to message #35060] Wed, 25 February 2009 07:56 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello,

according to
http://forum.openvz.org/index.php?t=msg&goto=30020&& amp;srch=cpulimit#msg_30194
cpulimit is not implemented in 2.6.24 kernel yet.

Moreover, 2.6.24 kernels are under development now
http://download.openvz.org/kernel/
so in case of performance tests it worth trying 2.6.18 kernels too (cpulimit is working there).
Re: Limiting CPU resources to a VE? [message #35096 is a reply to message #35060] Fri, 27 February 2009 12:31 Go to previous message
myst is currently offline  myst
Messages: 3
Registered: February 2009
Location: Lithuania
Junior Member
Yes, in the 2.6.18 kernel cpulimit works, but how about ICH9 support in that kernel?
It seems that 2.6.18 kernel do not support ICH9.
We use hardware with ICH9DO and we need cpulimit, cpuuinits and etc.
Do exist any solution for this problem: kernel with ICH9 and cpulimit support?
Thanks for any advises!
Previous Topic: Vps Destroy error
Next Topic: Kernel panic after bad pmd in mm/memory.c
Goto Forum:
  


Current Time: Mon Aug 19 23:17:03 GMT 2024

Total time taken to generate the page: 0.04663 seconds