"cpus" config option and "--set cpus" issue [message #34544] |
Fri, 16 January 2009 11:39 |
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
|
|
|
Re: "cpus" config option and "--set cpus" issue [message #34545 is a reply to message #34544] |
Fri, 16 January 2009 11:54 |
khorenko
Messages: 533 Registered: January 2006 Location: Moscow, Russia
|
Senior Member |
|
|
Hi Paul,
can you please check if --cpus works OK with RHEL5-based OpenVZ kernel?
If it works as expected, please, file a bug for 2.6.24 kernel.
Thank you!
--
Konstantin
If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
|
|
|
|
Re: "cpus" config option and "--set cpus" issue [message #34547 is a reply to message #34546] |
Fri, 16 January 2009 12:12 |
khorenko
Messages: 533 Registered: January 2006 Location: Moscow, Russia
|
Senior Member |
|
|
Well, surely i don't want to force you to reinstall the host OS. But can you please try to install just the RHEL5-based OVZ kernel?
Not 100% sure that it will work fine, but it is worth to try i believe.
Quote: | But if you suspect it is a bug, I shall try a redhat based os.
|
In fact i suspect that simply that feature was not migrated from 2.6.18-x to 2.6.24. Why - this is the question.
--
Konstantin
If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
|
|
|
|
|
|
|
|
|