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 previous 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
 
Read Message
Read Message
Read Message
Previous Topic: Vps Destroy error
Next Topic: Kernel panic after bad pmd in mm/memory.c
Goto Forum:
  


Current Time: Tue Aug 20 01:22:13 GMT 2024

Total time taken to generate the page: 0.05551 seconds