Support vcpu_pin_set in the XenAPI driver

Registered by John Garbutt on 2013-11-15

We already have the setting in libvirt:
cfg.StrOpt('vcpu_pin_set',
                help='Which pcpus can be used by vcpus of instance '
                     'e.g: "4-12,^8,15"'),

This change moves the setting back into the general area of the config, rather than the libvirt specific section.

The reason this is useful, is because you can often improve the performance of Xen on NUMA servers by pinning the Dom0 vCPU to particular physical CPUs. However, if you do this, you need to ensure no other VMs want to use those vCPUs, else they are likely to get starved of resources, and strange things may happen.

More details on XenServer's pinning API can be found here:
http://support.citrix.com/article/CTX117960

And details on dom0 pinning can be found here:
http://wiki.xen.org/wiki/XenCommonProblems#Can_I_dedicate_a_cpu_core_.28or_cores.29_only_for_dom0.3F

So to determine the best value for vcpu_pin_set, you need to list all the pCPU cores that you have not assigned to Dom0.

In XenAPI we have the ability to specify a "mask" that defines which physical cores the VM can be scheduled to. Using the vcpu_pin_set as the mask will then ensure the VMs vCPU only get scheduled on physical CPUs that are not reserved for Dom0.

Note, while XenAPI does not support expressions like "4-12,^8" we convert this to the appropriate mask in the code.

Blueprint information

Status:
Complete
Approver:
Russell Bryant
Priority:
Low
Drafter:
John Garbutt
Direction:
Approved
Assignee:
John Garbutt
Definition:
Approved
Series goal:
Accepted for icehouse
Implementation:
Implemented
Milestone target:
milestone icon 2014.1
Started by
Russell Bryant on 2013-11-15
Completed by
John Garbutt on 2014-01-03

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/xenapi-vcpu-pin-set,n,z

Addressed by: https://review.openstack.org/55722
    xenapi: add support for vcpu_pin_set

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.