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>
81 lines
2.8 KiB
YAML
81 lines
2.8 KiB
YAML
---
|
|
# Copyright 2022 Red Hat, Inc.
|
|
# All Rights Reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
- name: Overcloud Node ovs-dpdk Configuration
|
|
hosts: allovercloud
|
|
any_errors_fatal: true
|
|
gather_facts: true
|
|
|
|
# "socket_mem" and "pmd" are mandatory parameters
|
|
vars:
|
|
pmd: ''
|
|
socket_mem: ''
|
|
memory_channels: ''
|
|
lcore: ''
|
|
disable_emc: false
|
|
enable_tso: false
|
|
revalidator: ''
|
|
handler: ''
|
|
pmd_auto_lb: false
|
|
pmd_load_threshold: ''
|
|
pmd_improvement_threshold: ''
|
|
pmd_rebal_interval: ''
|
|
pmd_sleep_max: ''
|
|
nova_postcopy: true
|
|
tuned_profile: 'cpu-partitioning'
|
|
|
|
pre_tasks:
|
|
- name: Wait for provisioned nodes to boot
|
|
wait_for_connection:
|
|
timeout: 600
|
|
delay: 10
|
|
|
|
tasks:
|
|
- name: ovs-dpdk role specific config block
|
|
become: true
|
|
block:
|
|
- name: Set nova post copy for migration
|
|
set_fact:
|
|
tripleo_ovs_dpdk_vhost_postcopy_support: "{{ nova_postcopy }}"
|
|
when: tuned_profile != 'realtime-virtual-host'
|
|
|
|
- name: Disable nova post copy for migration
|
|
set_fact:
|
|
tripleo_ovs_dpdk_vhost_postcopy_support: false
|
|
when: tuned_profile == 'realtime-virtual-host'
|
|
|
|
- name: Set insertion probablity based on emc cache flag
|
|
set_fact:
|
|
tripleo_ovs_dpdk_emc_insertion_probablity: 0
|
|
when: disable_emc|bool
|
|
|
|
- name: Configure ovs-dpdk role params
|
|
include_role:
|
|
name: tripleo_ovs_dpdk
|
|
vars:
|
|
tripleo_ovs_dpdk_lcore_list: "{{ lcore }}"
|
|
tripleo_ovs_dpdk_pmd_core_list: "{{ pmd }}"
|
|
tripleo_ovs_dpdk_memory_channels: "{{ memory_channels }}"
|
|
tripleo_ovs_dpdk_socket_memory: "{{ socket_mem }}"
|
|
tripleo_ovs_dpdk_enable_tso: "{{ enable_tso }}"
|
|
tripleo_ovs_dpdk_revalidator_cores: "{{ revalidator }}"
|
|
tripleo_ovs_dpdk_handler_cores: "{{ handler }}"
|
|
tripleo_ovs_dpdk_pmd_auto_lb: "{{ pmd_auto_lb }}"
|
|
tripleo_ovs_dpdk_pmd_load_threshold: "{{ pmd_load_threshold }}"
|
|
tripleo_ovs_dpdk_pmd_improvement_threshold: "{{ pmd_improvement_threshold }}"
|
|
tripleo_ovs_dpdk_pmd_rebal_interval: "{{ pmd_rebal_interval }}"
|
|
tripleo_ovs_dpdk_pmd_sleep_max: "{{ pmd_sleep_max }}"
|