-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure Flatcar qdisc issue #1458
Comments
Hi @naioja, |
Hi Jeremi, At the moment a network packet will flow thru both queuing disciplines and that's not optimal and indeed that impacts performance. Interface enP39504s1
Interface eth0
|
Here's some remarks from looking at this:
So the consequences are the following: a) if we were to follow standard bond semantics, then we would configure netvsc with noqueue qdisc and vf with mq qdisc, as the vf is used for all the traffic. This has some awkward semantics: a netvsc with AN (accelerated networking) disabled would have qdisc, and when a VF is added we would suddenly have to move qdisc over to the VF. Same awkwardness applies to servicing events. b) the opposite approach: netvsc mq + vf noqueue seems more logical, BUT due to the different number of queues I wonder if this comes at a perf disadvantage compared to a). In general it seems doing this via udev is the sane approach, as that can be overridden by users. But otherwise there is an option to upstream a patch to force one of the two options through the kernel:
(this is option b), option a) can be achieved by setting I'll discuss with our kernel devs to see if they have any thoughts on this issue. |
This is a better rule that matches the VF (by checking the "slave" bit).
|
Adding NOQUEUE to VF Reference: flatcar/Flatcar#1458
In Azure when it comes to Linux performance networking we use SR-IOV with Mellanox drivers (mlx4 or mlx5), something specific to Azure is that this creates two interfaces a synthetic and a virtual interface, documentation about it can be found here : https://learn.microsoft.com/en-us/azure/virtual-network/accelerated-networking-how-it-works.
I believe the actual bond is create by the hv_netvsc kernel module and as we can see in the output below the enP* interface is picked up by the OS as a stand-alone interface and gets a qdisc attached ot it (Azure flatcar LTS VM image output):
I believe this to be a faulty configuration in Azure flatcar VMs using SR-IOV (accelerated networking) as we usually do not apply queuing disciplines to bridged or bonded interfaces like docker0 or virbr0.
This has other implications on how systemd applies the default setting for net.core.default_qdisc too, misusing the file /lib/sysctl.d/50-default.conf.
One of the (simple) fixes that I found was to apply the below “tuned” udev configuration for interface queuing disciplines:
Specifically for my tests I’ve set the maxrate for the fq queuing discipline to match the VM SKU interface line speed of 12.5 Gbit and I’ve upped the limit of processed packets to 100K since the limits set upstream are a bit random and arbitrary and may not be the best choice for running VMs in the cloud and expecting higher networking performance.
The text was updated successfully, but these errors were encountered: