PMD threads constantly poll Rx queues which are assigned to them. In order to reduce the CPU cycles they use, they can sleep for small periods of time when there is no load or very-low load on all the Rx queues they poll. This can be enabled by setting the max requested sleep time (in microseconds) for any PMD thread: $ ovs-vsctl set open_vswitch . other_config:pmd-maxsleep=50 With a non-zero max value a PMD may request to sleep by an incrementing amount of time up to the maximum time. If at any point the threshold of at least half a batch of packets (i.e. 16) is received from an Rx queue that the PMD is polling is met, the requested sleep time will be reset to 0. At that point no sleeps will occur until the no/low load conditions return. Sleeping in a PMD thread will mean there is a period of time when the PMD thread will not process packets. Sleep times requested are not guaranteed and can differ significantly depending on system configuration. The actual time not processing packets will be determined by the sleep and processor wake-up times and should be tested with each system configuration. Link: https://github.com/openvswitch/ovs/blob/v3.1.2/Documentation/topics/dpdk/pmd.rst#pmd-load-based-sleeping-experimental Cc: Christophe Fontaine <cfontain@redhat.com> Change-Id: Ifa0def0eb6fb21a7bb9313a88ff5f4de2e811c27 Signed-off-by: Robin Jarry <rjarry@redhat.com>
4.9 KiB
4.9 KiB
Role - tripleo-ovs-dpdk
Role Documentation
Welcome to the "tripleo-ovs-dpdk" role documentation. This role enables and configures DPDK in OpenvSwitch.
Requirements
- Ensure hugepages is enabled
Role Defaults
tripleo_ovs_dpdk_pmd_core_list- Description: (Mandatory) List of PMD Cores
for DPDK. Its a comma-separated string of logical cores. These core
should be part of
isolcpuskernel parameter and be excluded fromNovaComputeCpuDedicatedSetand fromNovaComputeCpuSharedSet - Default:
'' - Examples:
'1,13'
- Description: (Mandatory) List of PMD Cores
for DPDK. Its a comma-separated string of logical cores. These core
should be part of
tripleo_ovs_dpdk_lcore_list- Description: (Optional) List of lcores for DPDK. Its a comma-separated string of logical cores. All ovs-vswitchd threads will be pinned to the first core declared in the mask.
- Default:
'' - Examples:
'0,12'
tripleo_ovs_dpdk_socket_memory- Description: (Mandatory) Memory in MB to be allocated on each NUMA node for DPDK. Its a comma-separated string of memory in MB.
- Default:
'' - Examples:
'1024'for a single NUMA memory allocation'1024,1024'for a dual NUMA memory allocation
tripleo_ovs_dpdk_memory_channels- Description: (Optional) Number of memory channels in the memory architecture. Its a number.
- Default:
4
tripleo_ovs_dpdk_extra- Description: (Optional) Extra parameter to be passed on to DPDK for initialization. Its a string.
- Default:
''
tripleo_ovs_dpdk_revalidator_cores- Description: (Optional) Number of cores to he used for revalidator threads. Its a string with a number, specifying the count of logical cores to be used as revalidator threads.
- Default:
'' - Examples:
'2'
tripleo_ovs_dpdk_handler_cores- Description: (Optional) Number of cores to be used for handler threads. Its a string with a number, specifying the count of logical cores to be used as handler threads.
- Default:
'' - Examples:
'2'
tripleo_ovs_dpdk_emc_insertion_probablity- Description: (Optional) EMC insertion inverse probability. Its a string with a number of flows (out of which 1 flow will cached). Having 100, results in caching 1 in 100 flows. Having 0, disables EMC cache.
- Default:
'' - Examples:
'100'
tripleo_ovs_dpdk_enable_tso- Description: (Optional) Enable TSO support in OVS DPDK datapath.
- Default:
false - Examples:
true
tripleo_ovs_dpdk_pmd_auto_lb- Description: (Optional) Enable DPDK OVS PMD Auto Load Balance.
- Default:
false - Examples:
true
tripleo_ovs_dpdk_pmd_load_threshold- Description: (Optional) Minimum PMD thread load threshold, in range 0 to 100. Its a string with a number, specifies the minimum PMD thread load threshold (% of used cycles) of any non-isolated PMD threads when a PMD Auto Load Balance may be triggered.
- Default:
'' - Examples:
'50'
tripleo_ovs_dpdk_pmd_improvement_threshold- Description: (Optional) PMD load variance improvement threshold, in range 0 to 100. Its a string with a number, specifies the minimum evaluated % improvement in load distribution across the non-isolated PMD threads that will allow a PMD Auto Load Balance to occur. Note, setting this parameter to 0 will always allow an auto load balance to occur regardless of estimated improvement or not.
- Default:
'' - Examples:
'10'
tripleo_ovs_dpdk_pmd_rebal_interval- Description: (Optional) PMD auto load balancing interval, in range 0 to 20,000. Its a string with a number, specifies the minimum time (in minutes) between 2 consecutive PMD Auto Load Balancing iterations. The defaul value is 1 min.
- Default:
'' - Examples:
'5'
tripleo_ovs_dpdk_pmd_sleep_max- Description: (Optional) PMD maximum sleep time, in range 0 to 10,000. Its a string with a number, 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. 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.
- Default:
'' - Examples:
'50'
Modules
openvswitch_db- Description: It is a ansible core module, which requires additional changes which are in progress. Below are the pull requests against the core module. Once these are merged, this module can be removed.
Dependencies
None