diff options
author | Adrian Moreno <amorenoz@redhat.com> | 2022-12-19 19:29:06 +0100 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2022-12-20 13:56:46 +0100 |
commit | 0d23948a598ac609e9865174e0874e782a48d6a8 (patch) | |
tree | 7c0491c9d69515d0d8ea0dc62be38ce77eace2ba /NEWS | |
parent | d34245ea150a7ae4dbae9e7fc37e3adfcbbf0bc6 (diff) | |
download | openvswitch-0d23948a598ac609e9865174e0874e782a48d6a8.tar.gz |
ovs-thread: Detect changes in number of CPUs.
Currently, things like the number of handler and revalidator threads are
calculated based on the number of available CPUs. However, this number
is considered static and only calculated once, hence ignoring events
such as cpus being hotplugged, switched on/off or affinity mask
changing.
On the other hand, checking the number of available CPUs multiple times
per second seems like an overkill.
Affinity should not change that often and, even if it does, the impact
of destroying and recreating all the threads so often is probably a
price too expensive to pay.
I tested the impact of updating the threads every 5 seconds and saw
an impact in the main loop duration of <1% and a worst-case scenario
impact in throughput of < 5% [1]. This patch sets the default period to
10 seconds just to be safer.
[1] Tested in the worst-case scenario of disabling the kernel cache
(other_config:flow-size=0), modifying ovs-vswithd's affinity so the
number of handlers go up and down every 5 seconds and calculated the
difference in netperf's ops/sec.
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1,5 +1,7 @@ Post-v3.0.0 -------------------- + - ovs-vswitchd now detects changes in CPU affinity and adjusts the number + of handler and revalidator threads if necessary. - ovs-appctl: * "ovs-appctl ofproto/trace" command can now display port names with the "--names" option. |