<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.define-technology.com/mediawiki-1.35.0/index.php?action=history&amp;feed=atom&amp;title=VScaler%3AOpenStack_Performance_Tweaks</id>
	<title>VScaler:OpenStack Performance Tweaks - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.define-technology.com/mediawiki-1.35.0/index.php?action=history&amp;feed=atom&amp;title=VScaler%3AOpenStack_Performance_Tweaks"/>
	<link rel="alternate" type="text/html" href="http://wiki.define-technology.com/mediawiki-1.35.0/index.php?title=VScaler:OpenStack_Performance_Tweaks&amp;action=history"/>
	<updated>2026-05-04T21:23:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>http://wiki.define-technology.com/mediawiki-1.35.0/index.php?title=VScaler:OpenStack_Performance_Tweaks&amp;diff=27244&amp;oldid=prev</id>
		<title>Martin: Created VScaler:OpenStack Performance Tweaks</title>
		<link rel="alternate" type="text/html" href="http://wiki.define-technology.com/mediawiki-1.35.0/index.php?title=VScaler:OpenStack_Performance_Tweaks&amp;diff=27244&amp;oldid=prev"/>
		<updated>2018-07-06T15:31:21Z</updated>

		<summary type="html">&lt;p&gt;Created VScaler:OpenStack Performance Tweaks&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;===Disable HT in the BIOS on nova compute nodes.===&lt;br /&gt;
&lt;br /&gt;
===Enable NUMA topology in the BIOS on nova compute nodes.===&lt;br /&gt;
&lt;br /&gt;
===Enable nested virtualization===&lt;br /&gt;
&lt;br /&gt;
Verify nested virtualization is not already enabled:&lt;br /&gt;
On Intel systems use:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
cat /sys/module/kvm_intel/parameters/nested&lt;br /&gt;
N&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On AMD systems use:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
cat /sys/module/kvm_amd/parameters/nested&lt;br /&gt;
N&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shut down all VMs and unload the KVM module:&lt;br /&gt;
On Intel systems use:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
modprobe -r kvm_intel&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On AMD systems use:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
modprobe -r kvm_amd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activate nested virtualization until the next reboot:&lt;br /&gt;
On Intel systems use:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
modprobe kvm_intel nested=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On AMD systems use:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
modprobe kvm_amd nested=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enable persistent nested virtualization:&lt;br /&gt;
Add the following line to&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
/etc/modprobe.d/kvm.conf&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For Intel systems:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
options kvm_intel nested=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For AMD systems:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
options kvm_amd nested=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verify nested virtualization is enabled:&lt;br /&gt;
On Intel systems use:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
cat /sys/module/kvm_intel/parameters/nested&lt;br /&gt;
Y&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On AMD systems use:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
cat /sys/module/kvm_amd/parameters/nested&lt;br /&gt;
Y&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable cpu_passthrough on nova compute nodes===&lt;br /&gt;
Add the following line to&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
/etc/kolla/config/nova/nova-compute.conf&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
[libvirt]&lt;br /&gt;
cpu_mode=host-passthrough&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Set CPU and RAM allocation ratios===&lt;br /&gt;
Add or update the following lines to&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
/etc/kolla/config/nova/nova-compute.conf&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
[DEFAULT]&lt;br /&gt;
ram_allocation_ratio = 1.0&lt;br /&gt;
cpu_allocation_ratio = 1.0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Isolate CPU cores on nova compute nodes===&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
grubby --update-kernel=ALL --args=&amp;quot;isolcpus=0,1,2,3&amp;quot;&lt;br /&gt;
grub2-install /dev/sda&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
where &amp;quot;isolcpus=0,1,2,3&amp;quot; are the cores reserved for VM use.&lt;br /&gt;
&lt;br /&gt;
===Enable vCPU pinning on nova compute nodes===&lt;br /&gt;
Add the following line to /etc/kolla/config/nova-compute.conf or /etc/kolla/config/nova/$nodename/nova-compute.conf if different configurations are required on different nodes.&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
[DEFAULT]&lt;br /&gt;
vcpu_pin_set=0-35&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Where 0-35 is the range of dedicated cores to be allocated.&lt;br /&gt;
&lt;br /&gt;
===Nova scheduler configuration===&lt;br /&gt;
Add the following filters to the nova-scheduler configuration located in /etc/kolla/config/nova/nova-scheduler.conf&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
scheduler_default_filters= NUMATopologyFilter,AggregateInstanceExtraSpecsFilter&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Enable huge pages on nova compute nodes===&lt;br /&gt;
Check huge pages status&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
grep Huge /proc/meminfo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to &lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
/etc/default/grub&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
GRUB_CMDLINE_LINUX=&amp;quot;$GRUB_CMDLINE_LINUX hugepagesz=1G hugepages=160 transparent_hugepage=never&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Change the number of huge pages according to the host memory configuration.&lt;br /&gt;
&lt;br /&gt;
Grubby can also be used to add the kernel arguments:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
grubby --update-kernel=ALL --args=&amp;quot;hugepagesz=1G hugepages=160 transparent_hugepage=never&amp;quot;&lt;br /&gt;
grub2-install /dev/sda&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add huge pages flavor metadata===&lt;br /&gt;
In order to enable allocation of hugepages memory, flavors must have the &amp;quot;hw:mem_page_size&amp;quot; value set to either large or the page size.&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
openstack flavor set m1.large --property hw:mem_page_size=large&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add NUMA zone flavor metadata===&lt;br /&gt;
Add hw:numa_mempolicy=preferred and hw:numa_nodes=$number_of_numa_nodes to the flavor metadata&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
openstack flavor set m1.large --property hw:numa_mempolicy=preferred&lt;br /&gt;
openstack flavor set m1.large --property hw:numa_nodes=2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add CPU pinning flavor metadata===&lt;br /&gt;
Add hw:cpu_policy=dedicated and hw:cpu_thread_policy=preferred to the flavor metadata&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
openstack flavor set m1.large --property hw:cpu_thread_policy=preferred&lt;br /&gt;
openstack flavor set m1.large --property hw:cpu_policy=dedicated&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create a pinned CPU host aggregate===&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
nova aggregate-create performance&lt;br /&gt;
nova aggregate-set-metadata performance pinned=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add hosts to aggregate===&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
nova aggregate-add-host performance node01&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add aggregate metadata to flavor===&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
openstack flavor set m1.large --property aggregate_instance_extra_specs:pinned=true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Martin</name></author>
	</entry>
</feed>