Managed OpenStack
Latest
Frequently Asked Questions
Solution
How To
Internal Only
Templates
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
Configure CPU Pinning (Nova)
Copy Markdown
Open in ChatGPT
Open in Claude
Problem
Configure dedicated CPU cores pinned to instances for improved performance.
Environment
- Platform9 Managed OpenStack - v3.4.0 and Higher
- Nova
Procedure
- On each Compute node, edit /opt/pf9/etc/nova/conf.d/nova.conf and add
vcpu_pin_setunder theDEFAULTsection. Set thevcpu_pin_setvalue to a list or range of physical CPU cores to reserve for virtual machine processes. If the number of cores is 8 then set aside cores 0 and 1 for the host, and assign cores 2 through 7 for instances.
xxxxxxxxxxvcpu_pin_set=2-7- Set the
reserved_host_memory_mbto reserve RAM for host processes.
xxxxxxxxxxreserved_host_memory_mb=2048Note: By default, this value is set to 512 MB.
- To restrict the host process from using the vcpu, add the
isolcpuskernel argument to the GRUB configuration so that the kernel is aware of the pinning. Appendisolcpus=2,3,4,5,6,7to GRUB_CMDLINE_LINUX in /etc/default/grub, without modifying any existing arguments. - Rebuild grub.
xxxxxxxxxx# grub-mkconfig -o /boot/grub2/grub.cfg- Reboot the node.
- From the UI, create a host aggregate and add all the nodes with pinning configured. Along with that, add the metadata with key as pinned and value as true.
- Within the UI, create a new flavor and add the following metadata/specifications to it.
xxxxxxxxxxhw:cpu_policy -> dedicated aggregate_instance_extra_specs:pinned -> true- Launch an instance using the newly created flavor.
- To verify the CPU(s) pinned to the instance, first identify the instance from the
virsh listoutput.
xxxxxxxxxx# virsh list Id Name State---------------------------------------------------- 7 773fcf47-07e4-4e07-b681-ee2c39727666 running 8 5a80a581-7259-4c6e-82c4-8cbb48100186 runningxxxxxxxxxxAfter identifying the instance, pass its ID to the virsh vcpupin command:# virsh vcpupin 8VCPU: CPU Affinity----------------------------------0: 3Note: In the example above, the instance only has 1 CPU; and it's assigned to NUMA node 0 and core 3.
VariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches
Last updated on
Was this page helpful?
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message