<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Qemu on sysarcher/@ich_code</title><link>https://sysarcher.github.io/categories/qemu/</link><description>Recent content in Qemu on sysarcher/@ich_code</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 10 Nov 2020 21:22:37 +0200</lastBuildDate><atom:link href="https://sysarcher.github.io/categories/qemu/index.xml" rel="self" type="application/rss+xml"/><item><title>VM Optimizations for RT</title><link>https://sysarcher.github.io/posts/realtime-linux-vms/</link><pubDate>Tue, 10 Nov 2020 21:22:37 +0200</pubDate><guid>https://sysarcher.github.io/posts/realtime-linux-vms/</guid><description>&lt;p&gt;QEMU/KVM are a popular backend for OpenStack. In StarlingX Openstack (&lt;code&gt;stx-openstack&lt;/code&gt;) this is also the case. I&amp;rsquo;ll try to describe various techniques that I used to optimize RT behavior on an STX 4.0.1 cluster with worker nodes.&lt;/p&gt;
&lt;h4 id="terminology"&gt;Terminology&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Bare-Metal&lt;/strong&gt; is a a physical computer and it&amp;rsquo;s base OS&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Host&lt;/strong&gt; is a bare-metal machine that runs VMs&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Thread&lt;/strong&gt; is a core of a CPU&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CPU thread&lt;/strong&gt; refers to the thread on the host system CPU&lt;/p&gt;</description><content:encoded><![CDATA[<p>QEMU/KVM are a popular backend for OpenStack. In StarlingX Openstack (<code>stx-openstack</code>) this is also the case. I&rsquo;ll try to describe various techniques that I used to optimize RT behavior on an STX 4.0.1 cluster with worker nodes.</p>
<h4 id="terminology">Terminology</h4>
<p><strong>Bare-Metal</strong> is a a physical computer and it&rsquo;s base OS</p>
<p><strong>Host</strong> is a bare-metal machine that runs VMs</p>
<p><strong>Thread</strong> is a core of a CPU</p>
<p><strong>CPU thread</strong> refers to the thread on the host system CPU</p>
<p><strong>vCPU thread</strong> is a thread on a VM&rsquo;s virtualized CPU</p>
<p><em>Note: I borrowed terminology heavily from <a href="https://null-src.com/posts/qemu-optimization/post.php">this article on <code>null-src</code></a></em></p>
<h3 id="isolating-cpus">Isolating CPUs</h3>
<p><a href="https://shrmrf.github.io/rants/stx/2020/11/09/STX-for-RT.html">My last article covers this topic</a>. Isolating a VM&rsquo;s vCPU threads from the host system ensures that host&rsquo;s processes don&rsquo;t interfere with the VM.</p>
<h3 id="scheduling-openstack-vms-on-isolated-cores">Scheduling Openstack VMs on isolated cores</h3>
<h3 id="cpu-affinity">CPU Affinity</h3>
<h4 id="using-taskset">using <code>taskset</code></h4>
<h3 id="linux-process-scheduler-tuning">Linux Process Scheduler Tuning</h3>
<h3 id="grub-cmdline">GRUB cmdline</h3>
<p>Okay&hellip; don&rsquo;t delete the <code>console</code> entries in your command line&hellip; the entries below are for isolated cpu 1. This is not a comprehensive list&hellip; Just append whatever makes sense to you.</p>
<pre tabindex="0"><code>GRUB_CMDLINE_LINUX_DEFAULT=&#34;threadirqs rcu_nocbs=1 rcu_nocb_poll isolcpus=1 nohz_full=1 nohz=off intel_pstate=disable nosoftlockup nohalt&#34;
</code></pre>]]></content:encoded></item></channel></rss>