From 780d0e5f9707358a1f38dd6a181ab12a5c84a0f9 Mon Sep 17 00:00:00 2001 From: Martin Schuppert Date: Thu, 14 Jun 2018 16:35:46 +0200 Subject: [PATCH] Introduces NovaComputeCpuSharedSet parameter New compute/cpu_shared_set nova config can be set via parameter NovaComputeCpuSharedSet. Some workloads run best when the hypervisor overhead processes (emulator threads in libvirt/QEMU) can be placed on different physical host CPUs than other guest CPU resources. This allow those workloads to prevent latency spikes for guest vCPU threads. A list or range of physical CPU cores to reserve for for best- effort guest vCPU resources (e.g. emulator threads in libvirt/QEMU) can be specified. Closes-Bug: 1776905 Change-Id: I53c567e8eeef12d582205b6e2d8310635555b5b8 --- puppet/services/nova-compute.yaml | 12 ++++++++++++ .../compute-cpu-shared-set-be9da772ac8f7582.yaml | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 releasenotes/notes/compute-cpu-shared-set-be9da772ac8f7582.yaml diff --git a/puppet/services/nova-compute.yaml b/puppet/services/nova-compute.yaml index 8c64745236..bedef486b8 100644 --- a/puppet/services/nova-compute.yaml +++ b/puppet/services/nova-compute.yaml @@ -102,6 +102,16 @@ parameters: default: [] tags: - role_specific + NovaComputeCpuSharedSet: + description: > + A list or range of physical CPU cores will be used for best-effort guest + vCPU resources (e.g. emulator threads in libvirt/QEMU). + Ex. NovaComputeCpuSharedSet: [4-12,^8,15] will reserve cores from 4-12 + and 15, excluding 8. + type: comma_delimited_list + default: [] + tags: + - role_specific NovaReservedHostMemory: description: > Reserved RAM for host processes. @@ -172,10 +182,12 @@ resources: map_replace: - map_replace: - nova::compute::vcpu_pin_set: NovaVcpuPinSet + nova::compute::cpu_shared_set: NovaComputeCpuSharedSet nova::compute::reserved_host_memory: NovaReservedHostMemory - values: {get_param: [RoleParameters]} - values: NovaVcpuPinSet: {get_param: NovaVcpuPinSet} + NovaComputeCpuSharedSet: {get_param: NovaComputeCpuSharedSet} NovaReservedHostMemory: {get_param: NovaReservedHostMemory} outputs: diff --git a/releasenotes/notes/compute-cpu-shared-set-be9da772ac8f7582.yaml b/releasenotes/notes/compute-cpu-shared-set-be9da772ac8f7582.yaml new file mode 100644 index 0000000000..c5d58ecb85 --- /dev/null +++ b/releasenotes/notes/compute-cpu-shared-set-be9da772ac8f7582.yaml @@ -0,0 +1,16 @@ +--- +features: + - | + Introduces NovaComputeCpuSharedSet parameter to set + ``[compute]/cpu_shared_set`` option for compute nodes. + Some workloads run best when the hypervisor overhead processes + (emulator threads in libvirt/QEMU) can be placed on different + physical host CPUs than other guest CPU resources. This allows + those workloads to prevent latency spikes for guest vCPU threads. + + To place a workload's emulator threads on a set of isolated + physical CPUs, set the configuration option to the set of host + CPUs that should be used for best-effort CPU resources. Then set + a flavor extra spec to ``hw:emulator_threads_policy=share`` to + instruct nova to place that workload's emulator threads on that + set of host CPUs.