OpenVZ Forum


Home » General » Support » "cpus" config option and "--set cpus" issue
"cpus" config option and "--set cpus" issue [message #34544] Fri, 16 January 2009 11:39 Go to previous message
pauld is currently offline  pauld
Messages: 5
Registered: January 2009
Junior Member
Hello there,

I'm just starting out with openvz and have created my initial template following the walkthrough at http://wiki.openvz.org/Ubuntu_Hardy_template_creation.

I didn't really run into any issues with this (quite excellent) howto, but when trying to set the number of CPUs visable from a container, either using the command vzctl set <veid> --cpus <num> --save or by specifying and applying a ve config CPUS="1" the number of processors within the container stays the same as the hardware host.

root@vz:~# vzctl --version
vzctl version 3.0.22
root@vz:~# uname -a
Linux vz 2.6.24-23-openvz #1 SMP Thu Nov 27 20:50:16 UTC 2008 x86_64 GNU/Linux
root@vz:~# vzlist
      VEID      NPROC STATUS  IP_ADDR         HOSTNAME
       777          9 running -               -
root@vz:~# cat /proc/cpuinfo | egrep "processor|vendor_id"
processor       : 0
vendor_id       : GenuineIntel
processor       : 1
vendor_id       : GenuineIntel
processor       : 2
vendor_id       : GenuineIntel
processor       : 3
vendor_id       : GenuineIntel
processor       : 4
vendor_id       : GenuineIntel
processor       : 5
vendor_id       : GenuineIntel
processor       : 6
vendor_id       : GenuineIntel
processor       : 7
vendor_id       : GenuineIntel
root@vz:~# vzctl set 777 --cpus 1 --save
Setting CPUs: 1
Saved parameters for VE 777
root@vz:~# vzctl restart 777
Restarting VE
Stopping VE ...
VE was stopped
VE is unmounted
Starting VE ...
VE is mounted
Setting CPU units: 1000
Setting CPUs: 1
Configure meminfo: 9223372036854775807
File resolv.conf was modified
VE start in progress...
root@vz:~# vzctl exec 777 cat /proc/cpuinfo | egrep "processor|vendor_id"
processor       : 0
vendor_id       : GenuineIntel
processor       : 1
vendor_id       : GenuineIntel
processor       : 2
vendor_id       : GenuineIntel
processor       : 3
vendor_id       : GenuineIntel
processor       : 4
vendor_id       : GenuineIntel
processor       : 5
vendor_id       : GenuineIntel
processor       : 6
vendor_id       : GenuineIntel
processor       : 7
vendor_id       : GenuineIntel



Is there any more information I can provide to shine more light on this issue? (If it is indeed an issue and I amn't just misunderstanding the --cpus flag!) Any suggestions are greatly appreciated.

Regards,
Paul

[Updated on: Fri, 16 January 2009 11:50]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Checkpoint/Backup of a container
Next Topic: Devnodes question
Goto Forum:
  


Current Time: Sat Oct 05 12:24:39 GMT 2024

Total time taken to generate the page: 0.03619 seconds