You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Raise VIF limit from 7 to 16 by calculating max_grant_frames on domain creation (#6577)
xenopsd currently hardcodes 64 as the value for `max_grant_frames` for
all domains. This limits how many grants a domain can allocate, thus
limiting the number of VIFs and VBDs a domain can have.
`max_grant_frames` can be changed for individual VMs through specifying
a particular value in `platform`, but it's much better to be able to
estimate how many grant frames a VM would need based on the number of
VBDs and VIFs.
Implement this and add some notes on the difficulties and imprecisions
of such an estimation.
This allows raising the number of supported VIFs from the current limit
of 7 - we've picked 16 as a sweet spot, though this could be discussed
further. (note that it's the `allowed_vifs` limit that's changed, VIFs
can be created in arbitrary numbers on the CLI and by clients not
honouring the `allowed_vifs` advice).
Given the current behaviour of the XenServer/XCP-ng system
(hypervisor+drivers), where more VIFs allow for higher overall
networking throughput, this is highly beneficial - in testing overall
throughput with 16 VIFs was 18-27% higher than with 8 VIFs (tested with
multiple iperf3 instances running on all interfaces simultaneously). The
following table shows the performance per-VIF and per-VM on a host with
16 pcpus with 8 vCPUs for domU and dom0 each:

Moreover, some users coming from VMWare are used to networking setups
with dozens of VIFs, and this is a step towards allowing that without
encountering any other bottlenecks in the system.
Most of this work (except the last commit) was tested very thoroughly at
XenServer, since it was initially intended to raise the supported limit
of VBDs (it passed Ring3 BST+BVT multiple times, and ran through the
config limits test several times). Raising the number of supported VBDs
has other issues so was abandoned, but this PR solves all the issues for
VIFs.
The new limit was tested with XCP-ng, with a new test being added to our
CI (xcp-ng/xcp-ng-tests#338), which will verify
the ability to hit the new limit and perform well at it.
0 commit comments