summaryrefslogtreecommitdiff
path: root/vswitchd
diff options
context:
space:
mode:
authorKevin Traynor <ktraynor@redhat.com>2023-01-11 09:35:01 +0000
committerIlya Maximets <i.maximets@ovn.org>2023-01-12 18:56:05 +0100
commitde3bbdc479a9a78135e1922e4e6011732515e7ef (patch)
tree0e637afa610a029ca0b68567361d56108934851b /vswitchd
parentf4c884135139f0d9e309bcd58244191145c5abba (diff)
downloadopenvswitch-de3bbdc479a9a78135e1922e4e6011732515e7ef.tar.gz
dpif-netdev: Add PMD load based sleeping.
Sleep for an incremental amount of time if none of the Rx queues assigned to a PMD have at least half a batch of packets (i.e. 16 pkts) on an polling iteration of the PMD. Upon detecting the threshold of >= 16 pkts on an Rxq, reset the sleep time to zero (i.e. no sleep). Sleep time will be increased on each iteration where the low load conditions remain up to a total of the max sleep time which is set by the user e.g: ovs-vsctl set Open_vSwitch . other_config:pmd-maxsleep=500 The default pmd-maxsleep value is 0, which means that no sleeps will occur and the default behaviour is unchanged from previously. Also add new stats to pmd-perf-show to get visibility of operation e.g. ... - sleep iterations: 153994 ( 76.8 % of iterations) Sleep time (us): 9159399 ( 59 us/iteration avg.) ... Reviewed-by: Robin Jarry <rjarry@redhat.com> Reviewed-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Kevin Traynor <ktraynor@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'vswitchd')
-rw-r--r--vswitchd/vswitch.xml26
1 files changed, 26 insertions, 0 deletions
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index f9bdb2d92..8c4acfb18 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -788,6 +788,32 @@
The default value is <code>25%</code>.
</p>
</column>
+ <column name="other_config" key="pmd-maxsleep"
+ type='{"type": "integer",
+ "minInteger": 0, "maxInteger": 10000}'>
+ <p>
+ Specifies the maximum sleep time that will be requested in
+ microseconds per iteration for a PMD thread which has received zero
+ or a small amount of packets from the Rx queues it is polling.
+ </p>
+ <p>
+ The actual sleep time requested is based on the load
+ of the Rx queues that the PMD polls and may be less than
+ the maximum value.
+ </p>
+ <p>
+ The default value is <code>0 microseconds</code>, which means
+ that the PMD will not sleep regardless of the load from the
+ Rx queues that it polls.
+ </p>
+ <p>
+ To avoid requesting very small sleeps (e.g. less than 10 us) the
+ value will be rounded up to the nearest 10 us.
+ </p>
+ <p>
+ The maximum value is <code>10000 microseconds</code>.
+ </p>
+ </column>
<column name="other_config" key="userspace-tso-enable"
type='{"type": "boolean"}'>
<p>