<html><head>

</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div>On Thu, 2020-11-19 at 12:25 +0000, Stephen Finucane wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>On Thu, 2020-11-19 at 12:00 +0000, Eyle Brinkhuis wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>Hi all,</div><div class=""><br class=""></div><div class="">We’re running into an issue with deploying our infrastructure to run high throughput, low latency workloads.</div><div class=""><br class=""></div><div class="">Background:</div><div class=""><br class=""></div><div class="">We run Lenovo SR635 systems with an AMD Epyc 7502P processor. In the BIOS of this system, we are able to define the amount of NUMA cells per socket (called NPS). We can set 1, 2 or 4. As we run a 2x 100Gbit/s Mellanox CX5 in this system as well, we use the preferred-io setting in the BIOS to give preferred io throughput to the Mellanox CX5.</div><div class="">To make sure we get as high performance as possible, we set the NPS setting to 1, resulting in a single numa cell with 64 CPU threads available.</div><div class=""><br class=""></div><div class="">Next, in Nova (train distribution), we demand huge pages. Hugepages however, demands a NUMAtopology, but as this is one large NUMA cell, even with cpu=dedicated or requesting a single numa domain, we fail:</div><div class=""><br class=""></div><div class=""><span style="color: rgb(55, 56, 58); font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class="">compute03, compute03 fails NUMA topology requirements. No host NUMA topology while the instance specified one. host_passes /usr/lib/python3/dist-packages/nova/scheduler/filters/numa_topology_filter.py:119</span></div></blockquote><div><br></div><div>Oh, this is interesting. This would suggest that when NPS is configured to 1, the host is presented as a UMA system and libvirt doesn't present topology information for us to parse. That seems odd and goes against how I though newer versions of libvirt worked.</div><div><br></div><div>What do you see for when you run e.g.:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">    </span>$ virsh capabilities | xmllint --xpath '/capabilities/host/topology' -</div></blockquote><div><br></div><div>Also, what version of libvirt are you using? Past investigations [1] led me to believe that libvirt would now always present a NUMA topology for hosts, even if those hosts were in fact UMA.</div><div><br></div><div>[1] <a href="https://github.com/openstack/nova/commit/c619c3b5847de85b21ffcbf750c10421d8b7d193">https://github.com/openstack/nova/commit/c619c3b5847de85b21ffcbf750c10421d8b7d193</a></div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div class=""><div class="">Any idea how to counter this? Setting NPS-2 will create two NUMA domains, but also cut our performance way down.</div></div></blockquote><div><br></div><div>It's worth noting that by setting NP1 to 1, you're already cutting your performance. This makes it look like you've got a single NUMA node but of course, that doesn't change the physical design of the chip and there are still multiple memory controllers, some of which will be slower to access to from certain cores. You're simply mixing best and worst case performance to provide an average. You said you have two SR-IOV NICs. I assume you're bonding these NICs? If not, you could set NPS to 2 and then ensure the NICs are in PCI slots that correspond to different NUMA nodes. You can validate this configuration using tools like 'lstopo' and 'numactl'.</div><div><br></div><div>Stephen</div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div class=""><div class="">Thanks!</div><div class=""><br class=""></div><div class=""><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Regards,</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class=""></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Eyle</div></div><br class=""></div></blockquote><div><br></div><div class="-x-evo-signature-wrapper"><span class="-x-evo-signature" id="none"></span></div></blockquote><div><br></div></body></html>