Description of problem: It's currently possible to enable northd lflow build parallelization by setting the NB.NB_Global.Options:use_parallel_build option to true in the Northbound database. If that gets toggled to "true" ovn-northd will by default determine the number of CPUs and NUMAs available in the system and based on that decide if it will actually enable parallelization and with how many worker threads. When running upstream self tests we sometimes "trick" ovn-northd into believing that it runs on a single-NUMA node with 4 available CPUs: https://github.com/ovn-org/ovn/blob/a0ded8874865d999ac9e8204c6affa4a5fd70699/tests/ovn-macros.at#L174 While the same approach might be used by a CMS to force ovn-northd to use a given number of threads, it's probably better to have an explicit command line argument to configure the number of threads ovn-northd should use. For example something like: ovn-northd ... --n-threads=<VALUE> .. To avoid confusion this should probably be made the only officially supported way of enabling northd parallelization. That means that: - NB_Global.Options.use_parallel_build should become obsolete and be ignored by ovn-northd - --dummy-numa should not have an effect on the number of worker threads ovn-northd spawns for lflow build parallelization Additionally, it would be helpful if an appctl command would be added to ovn-northd to allow users to dynamically change the number of threads (and potentially disable) parallelization at runtime. E.g.: ovn-appctl -t ovn-northd parallel-build/n-threads <VALUE>
Upstream patch: http://patchwork.ozlabs.org/project/ovn/patch/20220516120807.834667-1-xsimonar@redhat.com/
v5 was accepted upstream for 22.06 and later: http://patchwork.ozlabs.org/project/ovn/patch/20220519112017.1162522-1-xsimonar@redhat.com/