<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Dev diaries #1: Analyzing storage perf (SMAPIv3)]]></title><description><![CDATA[<h3>SMAPIv3: results and analyze</h3>
<p dir="auto">After some investigation, it was discovered that the SMAPIv3 is not THE perfect storage interface.  Here are some charts to analyze:</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1551364927461-chart3.png" alt="chart3.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="/forum/assets/uploads/files/1551364914957-chart1.png" alt="chart1.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="/forum/assets/uploads/files/1551369608981-chart2.png" alt="chart2.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Yeah, there are many storage types:</p>
<ul>
<li>lvm, ext (well known)</li>
<li>ext4 (storage type added on SMAPIv1)</li>
<li>ext4-ng (a new storage type added on SMAPIv3 for this benchmark and surely available in the future)</li>
<li>xfs-ng (same idea but for XFS)</li>
</ul>
<p dir="auto">You can notice the usage of RAID0 with ext4-ng, but it's not important for the moment.</p>
<p dir="auto">Let's focus on the performance of <strong>ext4-ng/xfs-ng</strong>! How can we explain these poor results?! By default the SMAPIv3 plugins like gfs2/filebased  added by Citrix use <strong>qemu-dp</strong>. It is a fork of qemu, it's also a substitute of the <strong>tapdisk/VHD</strong> environment used to improve performance and remove some limitations like the maximum size supported by the VHD format (2TB). QEMU supports QCow images to break this limitation.</p>
<p dir="auto">So, the performance problem of the SMAPIv3 seems related to qemu-dp. And yes... You can see the results of the <strong>ext4-ng VHD</strong> and <strong>ext4-ng VHDv1</strong> plugins, they are very close to the SMAPIv1 measurements:</p>
<ul>
<li>The ext4-ng VHDv1 plugin uses the O_DIRECT flag + a timeout like the SMAPIv1 implementation.</li>
<li>The ext4-ng VHD plugin does not use the O_DIRECT flag.</li>
</ul>
<p dir="auto">Next, to validate a potential bottleneck in the qemu-dp process, two RAID0 have been set up (one with 2 disks and an other with 4), and it seems interesting to see a good usage of the physical disk! There is one qemu process for each disk in our VM, and the disk usage is similar of the performance observed in the Dom0.</p>
<h3>For the future</h3>
<p dir="auto">The SMAPIv3/qemu-dp tuple is not totally a problem:</p>
<ul>
<li>A good scale is visible with the RAID0 benchmark.</li>
<li>It's easy to add a new storage type in the SMAPIv3. (Two plugin types: Volume and Datapath automatically detected when added in this system. See: <a href="https://xapi-project.github.io/xapi-storage/#learn-architecture" target="_blank" rel="noopener noreferrer nofollow ugc">https://xapi-project.github.io/xapi-storage/#learn-architecture</a>)</li>
<li>The QCow2 format is a good alternative to break the size limitation of the VHD images.</li>
<li>A RAID0 on the SMAPIv1 does not improve the I/O performance contrary to qemu-dp.</li>
</ul>
<p dir="auto">Next steps:</p>
<ul>
<li>Understand how qemu-dp is called (context, parameters, ...).</li>
<li>Find the bottleneck in the qemu-dp.</li>
<li>Find a solution to improve the performance.</li>
</ul>
]]></description><link>https://xcp-ng.org/forum/topic/1036/dev-diaries-1-analyzing-storage-perf-smapiv3</link><generator>RSS for Node</generator><lastBuildDate>Wed, 20 May 2026 05:11:31 GMT</lastBuildDate><atom:link href="https://xcp-ng.org/forum/topic/1036.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 28 Feb 2019 16:04:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Dev diaries #1: Analyzing storage perf (SMAPIv3) on Fri, 19 Apr 2019 08:33:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/kalloritis" aria-label="Profile: Kalloritis">@<bdi>Kalloritis</bdi></a> I'm not sure about that. You see a stack of "unknown" functions because the tapdisk binary was not compiled with all debug symbols, contrary to qemu-dp.</p>
<p dir="auto">And I'm waiting for the next XenServer release before continuing this diary. <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=bbd7a2dd886" class="not-responsive emoji emoji-android emoji--wink" style="height:23px;width:auto;vertical-align:middle" title=";)" alt="😉" /></p>
]]></description><link>https://xcp-ng.org/forum/post/10857</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/10857</guid><dc:creator><![CDATA[ronan-a]]></dc:creator><pubDate>Fri, 19 Apr 2019 08:33:15 GMT</pubDate></item><item><title><![CDATA[Reply to Dev diaries #1: Analyzing storage perf (SMAPIv3) on Fri, 19 Apr 2019 03:19:35 GMT]]></title><description><![CDATA[<p dir="auto">Tapdisk is just palin not good as a storage control mechanism, IMO. There's only so much you can pull out of it.</p>
]]></description><link>https://xcp-ng.org/forum/post/10853</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/10853</guid><dc:creator><![CDATA[tjkreidl]]></dc:creator><pubDate>Fri, 19 Apr 2019 03:19:35 GMT</pubDate></item><item><title><![CDATA[Reply to Dev diaries #1: Analyzing storage perf (SMAPIv3) on Wed, 17 Apr 2019 23:23:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ronan-a" aria-label="Profile: ronan-a">@<bdi>ronan-a</bdi></a> what call is causing such a deep call stack in tapdisk? All of them look to be "unknown," including its direct parent after tapdisk itself.</p>
]]></description><link>https://xcp-ng.org/forum/post/10832</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/10832</guid><dc:creator><![CDATA[Kalloritis]]></dc:creator><pubDate>Wed, 17 Apr 2019 23:23:29 GMT</pubDate></item><item><title><![CDATA[Reply to Dev diaries #1: Analyzing storage perf (SMAPIv3) on Wed, 06 Mar 2019 10:42:43 GMT]]></title><description><![CDATA[<p dir="auto">All tests are done with a local NVMe Optane drive, no network anywhere.</p>
]]></description><link>https://xcp-ng.org/forum/post/9558</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/9558</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Wed, 06 Mar 2019 10:42:43 GMT</pubDate></item><item><title><![CDATA[Reply to Dev diaries #1: Analyzing storage perf (SMAPIv3) on Wed, 06 Mar 2019 10:33:23 GMT]]></title><description><![CDATA[<p dir="auto">Wow... however I got lost.<br />
This is far too high to my knowledge.</p>
<p dir="auto">However... are you comparing local disk with local disk (in order to avoid networks related bottleneck)?</p>
]]></description><link>https://xcp-ng.org/forum/post/9556</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/9556</guid><dc:creator><![CDATA[maxcuttins]]></dc:creator><pubDate>Wed, 06 Mar 2019 10:33:23 GMT</pubDate></item><item><title><![CDATA[Reply to Dev diaries #1: Analyzing storage perf (SMAPIv3) on Tue, 05 Mar 2019 16:17:42 GMT]]></title><description><![CDATA[<h3>qemu-dp/tapdisk and CPU Usage per function call</h3>
<p dir="auto">Thank you to flamegraph. <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=bbd7a2dd886" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /> (See: <a href="http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html</a>)<br />
Analysis and improvements in a future message!</p>
<h4>qemu</h4>
<p dir="auto"><img src="/forum/assets/uploads/files/1551800071281-out.png" alt="out.png" class=" img-fluid img-markdown" /></p>
<h4>tapdisk</h4>
<p dir="auto"><img src="/forum/assets/uploads/files/1551801974307-tapdisk.png" alt="tapdisk.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://xcp-ng.org/forum/post/9537</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/9537</guid><dc:creator><![CDATA[ronan-a]]></dc:creator><pubDate>Tue, 05 Mar 2019 16:17:42 GMT</pubDate></item><item><title><![CDATA[Reply to Dev diaries #1: Analyzing storage perf (SMAPIv3) on Mon, 04 Mar 2019 12:48:55 GMT]]></title><description><![CDATA[<h3>qemu-dp: context and parameters</h3>
<p dir="auto">Here are some new charts. Make sure you understand the global QCOW2 image structure. (See: <a href="https://events.static.linuxfound.org/sites/events/files/slides/kvm-forum-2017-slides.pdf" target="_blank" rel="noopener noreferrer nofollow ugc">https://events.static.linuxfound.org/sites/events/files/slides/kvm-forum-2017-slides.pdf</a>)</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1551697511875-ioping.png" alt="ioping.png" class=" img-fluid img-markdown" /><br />
<img src="/forum/assets/uploads/files/1551697515621-random.png" alt="random.png" class=" img-fluid img-markdown" /><br />
<img src="/forum/assets/uploads/files/1551697534038-sequential.png" alt="sequential.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">More explicit labels <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=bbd7a2dd886" class="not-responsive emoji emoji-android emoji--wink" style="height:23px;width:auto;vertical-align:middle" title=":wink:" alt="😉" />:</p>
<ul>
<li>ext4-ng: qemu-dp with default parameters (O_DIRECT and no-flush)</li>
<li>ext4-ng (VHD): tapdisk with VHD (no O_DIRECT + timeout)</li>
<li>ext4-ng (Buffer/Flush): no O_DIRECT + flush allowed</li>
<li>Cache <strong>A</strong>: L2-Cache=3MiB</li>
<li>Cache <strong>B</strong>: L2-Cache=6.25MiB</li>
<li>Cache <strong>C</strong>: Entry-Size=8KiB</li>
<li>Cache <strong>D</strong>: Entry-Size=64KiB + no O_DIRECT + flush allowed</li>
<li>Cache <strong>E</strong>: L2-Cache=8MiB + Entry-size=8KiB + no O_DIRECT + flush allowed</li>
<li>Cache <strong>F</strong>: L2-Cache=8MiB + Entry-size=8KiB + no O_DIRECT</li>
<li>Cache <strong>G</strong>: L2-Cache=8MiB + Entry-size=8KiB</li>
<li>Cache <strong>H</strong>: L2-Cache=8MiB + Entry-size=16KiB + no O_DIRECT</li>
<li>Cache <strong>I</strong>: L2-Cache=16MiB + Entry-size=8KiB + no O_DIRECT</li>
</ul>
<p dir="auto">These results where obtained with an optane (nvme). We can see a better random write performance with the <strong>F</strong> configuration instead of using the default qemu-dp parameters and the ioping is not so bad. But it's not sufficient compared to tapdisk.</p>
<p dir="auto">So like said in the previous message, it's the moment to find the bottleneck in the qemu-dp process. <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=bbd7a2dd886" class="not-responsive emoji emoji-android emoji--wink" style="height:23px;width:auto;vertical-align:middle" title=";)" alt="😉" /></p>
]]></description><link>https://xcp-ng.org/forum/post/9486</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/9486</guid><dc:creator><![CDATA[ronan-a]]></dc:creator><pubDate>Mon, 04 Mar 2019 12:48:55 GMT</pubDate></item></channel></rss>