How to set cpuset attribute in vcpu element in instance xml?
Hi, in relation to the changes shown here : https:/
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- wangpan
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
1.what hypervisor are you using?
2.how many pcpus you have?
3.what the vcpu_pin_set config you set?
4.can you give me the libvirt.xml of your instance?
2013-06-27
Wangpan
发件人:Peeyush Gupta <email address hidden>
发送时间:2013-06-26 16:41
主题:[Question #231384]: How to set cpuset attribute in vcpu element in instance xml?
收件人:"hzwangpan"
抄送:
New question #231384 on OpenStack Compute (nova):
https:/
Hi, in relation to the changes shown here : https:/
--
You received this question notification because you are a direct
subscriber of the question.
Revision history for this message
|
#2 |
Hi wangpan, thanks for the reply. I am running Ubuntu 12.04 as a VM on Fedora 18 host. Here are the details:
1. I am using kvm.
2. I have 3 pcpus.
3. I set vcpu_pin_set = 2 in nova.conf
4. Here is the xml:
<domain type='qemu'>
<name>
<uuid>
<memory>
<currentMemor
<vcpu>1</vcpu>
<sysinfo type='smbios'>
<system>
<entry name='manufactu
<entry name='product'
<entry name='version'
<entry name='serial'
<entry name='uuid'
</system>
</sysinfo>
<os>
<type arch='x86_64' machine=
<boot dev='hd'/>
<smbios mode='sysinfo'/>
</os>
<features>
<acpi/>
<apic/>
</features>
<clock offset='utc'/>
<on_poweroff>
<on_reboot>
<on_crash>
<devices>
<emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>
<interface type='bridge'>
<mac address=
<source bridge='br100'/>
<model type='virtio'/>
<driver name='qemu'/>
<filterref filter=
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='file'>
<source path='/
<target port='0'/>
</serial>
<serial type='pty'>
<target port='1'/>
</serial>
<console type='file'>
<source path='/
<target type='serial' port='0'/>
</console>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'>
<listen type='address' address=
</graphics>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</memballoon>
</devices>
</domain>
Revision history for this message
|
#3 |
where you added the vcpu_pin_set = 1 to nova.conf? the [DEFAULT] section or just at the end of nova.conf?
if you didn't add it to the correct [DEFAULT] section, it will be invalid.
you can try ot add it like this:
ubuntu@
[DEFAULT]
vcpu_pin_set = 1
log_dir=
compute_driver = libvirt.
firewall_driver = nova.virt.
2013-06-27
Wangpan
发件人:Peeyush Gupta <email address hidden>
发送时间:2013-06-27 13:26
主题:Re: [Question #231384]: How to set cpuset attribute in vcpu element in instance xml?
收件人:"hzwangpan"
抄送:
Question #231384 on OpenStack Compute (nova) changed:
https:/
Status: Answered => Open
Peeyush Gupta is still having a problem:
Hi wangpan, thanks for the reply. I am running Ubuntu 12.04 as a VM on
Fedora 18 host. Here are the details:
1. I am using kvm.
2. I have 3 pcpus.
3. I set vcpu_pin_set = 2 in nova.conf
4. Here is the xml:
<domain type='qemu'>
<name>
<uuid>
<memory>
<currentMemor
<vcpu>1</vcpu>
<sysinfo type='smbios'>
<system>
<entry name='manufactu
<entry name='product'
<entry name='version'
<entry name='serial'
<entry name='uuid'
</system>
</sysinfo>
<os>
<type arch='x86_64' machine=
<boot dev='hd'/>
<smbios mode='sysinfo'/>
</os>
<features>
<acpi/>
<apic/>
</features>
<clock offset='utc'/>
<on_poweroff>
<on_reboot>
<on_crash>
<devices>
<emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>
<interface type='bridge'>
<mac address=
<source bridge='br100'/>
<model type='virtio'/>
<driver name='qemu'/>
<filterref filter=
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='file'>
<source path='/
<target port='0'/>
</serial>
<serial type='pty'>
<target port='1'/>
</serial>
<console type='file'>
<source path='/
<target type='serial' port='0'/>
</console>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'>
<listen type='address' address=
</graphics>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</memballoon>
</devices>
</domain>
1,1 Top
--
You received this question notification because you are a direct
subscriber of the question.
Revision history for this message
|
#4 |
I have added it to the [DEFAULT] section only. When I did head /etc/nova/
root@peeyush-
[DEFAULT]
vcpu_pin_set = 2
log_dir = /var/log/nova
firewall_driver = nova.virt.
compute_driver = libvirt.
flat_interface = eth0
flat_network_bridge = br100
vlan_interface = eth0
public_interface = br100
I launched a new instance after that and it's still not working. Still there is no cpuset attribute in the vcpu element.
Revision history for this message
|
#5 |
have you restart your nova processes after added vcpu_pin_set to nova.conf? such as nova-compute?
and you may grep 'vcpu_pin_set' /var/log/
mine is:
2013-06-27 05:51:41.335 DEBUG nova.openstack.
2013-06-27
Wangpan
发件人:Peeyush Gupta <email address hidden>
发送时间:2013-06-27 15:01
主题:Re: [Question #231384]: How to set cpuset attribute in vcpu element in instance xml?
收件人:"hzwangpan"
抄送:
Question #231384 on OpenStack Compute (nova) changed:
https:/
Status: Answered => Open
Peeyush Gupta is still having a problem:
I have added it to the [DEFAULT] section only. When I did head
/etc/nova/
root@peeyush-
[DEFAULT]
vcpu_pin_set = 2
log_dir = /var/log/nova
firewall_driver = nova.virt.
compute_driver = libvirt.
flat_interface = eth0
flat_network_bridge = br100
vlan_interface = eth0
public_interface = br100
I launched a new instance after that and it's still not working. Still
there is no cpuset attribute in the vcpu element.
--
You received this question notification because you are a direct
subscriber of the question.
Revision history for this message
|
#6 |
Okay, looks like devstack doesn't have services, it has screens and I am not sure how to restart them. I am gonna need some time to figure that out. Plus, for God knows what reason my devstack setup doesn't log anything!
Revision history for this message
|
#7 |
you should mkdir for log_dir(
and in my devstack(host is ubuntu 12.04), I just killed the nova-compute process by kill pid-of-
and then start it manually by:
nohup nova-compute 2>/dev/null &
by the way, if the log of nova-compute is nothing after you mkdir and chown, you can start nova-compute by:
nohup nova-compute 2>/tmp/
and you can see the log at /tmp/nova-
2013-06-27
Wangpan
发件人:Peeyush Gupta <email address hidden>
发送时间:2013-06-27 15:36
主题:Re: [Question #231384]: How to set cpuset attribute in vcpu element in instance xml?
收件人:"hzwangpan"
抄送:
Question #231384 on OpenStack Compute (nova) changed:
https:/
Status: Answered => Open
Peeyush Gupta is still having a problem:
Okay, looks like devstack doesn't have services, it has screens and I am
not sure how to restart them. I am gonna need some time to figure that
out. Plus, for God knows what reason my devstack setup doesn't log
anything!
--
You received this question notification because you are a direct
subscriber of the question.
Revision history for this message
|
#8 |
Hi wangpan, sorry for replying late, I was busy with some other stuff. I tried it out and guess what, it's working! Thank you very much! One more thing, is there any way to pin cpus dynamically? Meaning that when I give "nova boot" command can I decide which cpus I am going to pin this particular VM and the result reflects in the VM's xml? Does this mechanism works for each instance or just for making groups for libvirt to use?
Revision history for this message
|
#9 |
Thanks wangpan, that solved my question.
Revision history for this message
|
#10 |
is there any way to pin cpus dynamically?
I believe there is no way to do this, currently the vcpu_pin_set affects all instances.
2013-07-01
Wangpan
发件人:Peeyush Gupta <email address hidden>
发送时间:2013-07-01 16:16
主题:Re: [Question #231384]: How to set cpuset attribute in vcpu element in instance xml?
收件人:"hzwangpan"
抄送:
Question #231384 on OpenStack Compute (nova) changed:
https:/
Status: Answered => Solved
Peeyush Gupta confirmed that the question is solved:
Hi wangpan, sorry for replying late, I was busy with some other stuff. I
tried it out and guess what, it's working! Thank you very much! One more
thing, is there any way to pin cpus dynamically? Meaning that when I
give "nova boot" command can I decide which cpus I am going to pin this
particular VM and the result reflects in the VM's xml? Does this
mechanism works for each instance or just for making groups for libvirt
to use?
--
You received this question notification because you are a direct
subscriber of the question.
Revision history for this message
|
#11 |
Okay, thanks again for your time.
Revision history for this message
|
#12 |
I have an HP server with 12 cores. I want to install a VM on this server with OpenStack and set the cpuset values to 0-11. Currently when installing the vm I see in the xml that the cpuset = '3-5,9-11''
at /etc/nova/nova.conf I don't have the parameter vcpu_pin_set.
two questions: 1. how do I configure cpuset to 0-11?
2. why cpuset is equal to 3-5,9-11 and what is the defalut value of vcpu_pin_set?
Thank you.