282f6af3db
By default, mlockall() is enabled for ovs-vswitchd. This results in locking all of ovs-vswitchd's process memory into physical RAM and prevents paging. This enables network performance but can lead to memory exhaustion in memory-constrained environments. To disable mlockall(), the disable-mlockall charm config option can be set to True. If unset, disable-mlockall charm config will result in disabling mlockall if running in a container. The drop_config.append(OVS_DEFAULT) logic is no longer used as it prevents a rewrite of the config template when charm config is reset. For example, the new behavior results in /etc/default/openvswitch-switch being written with comments only when the corresponding config options are disabled (see template), resulting in openvswitch-switch being restarted. Due to the removal of drop_config.append(OVS_DEFAULT), pause/resume actions need to explicitly remove openswitch-switch to maintain prior behavior for non-DPDK deployments. In other words, pause/resume will not restart openvswitch-switch. Closes-Bug: #1906280 Related-Bug: #1908615 Change-Id: I2e3153e90c7a4a1b7dec7d6df427b33a449f414d
15 lines
763 B
Bash
15 lines
763 B
Bash
# This is a POSIX shell fragment -*- sh -*-
|
|
###############################################################################
|
|
# [ WARNING ]
|
|
# Configuration file maintained by Juju. Local changes may be overwritten.
|
|
# Configuration managed by neutron-openvswitch charm
|
|
# Service restart triggered by remote application: {{ restart_trigger }}
|
|
# {{ restart_trigger_ovs }}
|
|
###############################################################################
|
|
{% if dpdk_enabled -%}
|
|
DPDK_OPTS='--dpdk -c {{ cpu_mask }} -n 4 --socket-mem {{ socket_memory }} {{ device_whitelist }} --vhost-owner libvirt-qemu:kvm --vhost-perm 0660'
|
|
{% endif -%}
|
|
{% if disable_mlockall -%}
|
|
OVS_CTL_OPTS='--no-mlockall'
|
|
{% endif -%}
|