[nova] Add flag to set libvirt tb_cache_size
A config option is being added in nova with [1] in order to allow configuring lower tb-cache size for qemu guest VMs. This patch adds a flag in devstack so jobs can utilize it to set required tb-cache size. [1] https://review.opendev.org/c/openstack/nova/+/868419 Co-Authored-By: Sean Mooney <work@seanmooney.info> Related: blueprint libvirt-tb-cache-size Change-Id: Ifde737eb5d87dfe860445097d1f2b0ce16b0de05
This commit is contained in:
parent
db305d2a4b
commit
c707dd3fc2
18
.zuul.yaml
18
.zuul.yaml
@ -544,17 +544,15 @@
|
|||||||
# increase in swap performance by reducing the amount of data
|
# increase in swap performance by reducing the amount of data
|
||||||
# written to disk. the overall speedup is proportional to the
|
# written to disk. the overall speedup is proportional to the
|
||||||
# compression ratio and the speed of the swap device.
|
# compression ratio and the speed of the swap device.
|
||||||
|
# NOTE: this option is ignored when not using nova with the libvirt
|
||||||
|
# virt driver.
|
||||||
|
NOVA_LIBVIRT_TB_CACHE_SIZE: 128
|
||||||
ENABLE_ZSWAP: true
|
ENABLE_ZSWAP: true
|
||||||
devstack_local_conf:
|
devstack_local_conf:
|
||||||
post-config:
|
post-config:
|
||||||
$NEUTRON_CONF:
|
$NEUTRON_CONF:
|
||||||
DEFAULT:
|
DEFAULT:
|
||||||
global_physnet_mtu: '{{ external_bridge_mtu }}'
|
global_physnet_mtu: '{{ external_bridge_mtu }}'
|
||||||
$NOVA_CPU_CONF:
|
|
||||||
libvirt:
|
|
||||||
# Use lower TB cache than default(1GiB), only applicable with
|
|
||||||
# libvirt>=8.0.0
|
|
||||||
tb_cache_size: 128
|
|
||||||
devstack_services:
|
devstack_services:
|
||||||
# Core services enabled for this branch.
|
# Core services enabled for this branch.
|
||||||
# This list replaces the test-matrix.
|
# This list replaces the test-matrix.
|
||||||
@ -659,13 +657,9 @@
|
|||||||
# written to disk. the overall speedup is porportional to the
|
# written to disk. the overall speedup is porportional to the
|
||||||
# compression ratio and the speed of the swap device.
|
# compression ratio and the speed of the swap device.
|
||||||
ENABLE_ZSWAP: true
|
ENABLE_ZSWAP: true
|
||||||
devstack_local_conf:
|
# NOTE: this option is ignored when not using nova with the libvirt
|
||||||
post-config:
|
# virt driver.
|
||||||
$NOVA_CPU_CONF:
|
NOVA_LIBVIRT_TB_CACHE_SIZE: 128
|
||||||
libvirt:
|
|
||||||
# Use lower TB cache than default(1GiB), only applicable with
|
|
||||||
# libvirt>=8.0.0
|
|
||||||
tb_cache_size: 128
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: devstack-ipv6
|
name: devstack-ipv6
|
||||||
|
6
lib/nova
6
lib/nova
@ -173,6 +173,9 @@ NOVA_SHUTDOWN_TIMEOUT=${NOVA_SHUTDOWN_TIMEOUT:-0}
|
|||||||
# Whether to use Keystone unified limits instead of legacy quota limits.
|
# Whether to use Keystone unified limits instead of legacy quota limits.
|
||||||
NOVA_USE_UNIFIED_LIMITS=$(trueorfalse False NOVA_USE_UNIFIED_LIMITS)
|
NOVA_USE_UNIFIED_LIMITS=$(trueorfalse False NOVA_USE_UNIFIED_LIMITS)
|
||||||
|
|
||||||
|
# TB Cache Size in MiB for qemu guests
|
||||||
|
NOVA_LIBVIRT_TB_CACHE_SIZE=${NOVA_LIBVIRT_TB_CACHE_SIZE:-0}
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
# ---------
|
# ---------
|
||||||
|
|
||||||
@ -1071,6 +1074,9 @@ function start_nova_compute {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
|
if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
|
||||||
|
if [ ${NOVA_LIBVIRT_TB_CACHE_SIZE} -gt 0 ]; then
|
||||||
|
iniset $NOVA_CPU_CONF libvirt tb_cache_size ${NOVA_LIBVIRT_TB_CACHE_SIZE}
|
||||||
|
fi
|
||||||
# The group **$LIBVIRT_GROUP** is added to the current user in this script.
|
# The group **$LIBVIRT_GROUP** is added to the current user in this script.
|
||||||
# ``sg`` is used in run_process to execute nova-compute as a member of the
|
# ``sg`` is used in run_process to execute nova-compute as a member of the
|
||||||
# **$LIBVIRT_GROUP** group.
|
# **$LIBVIRT_GROUP** group.
|
||||||
|
Loading…
Reference in New Issue
Block a user