From d7cdad5325180c5502fdfd742abcde0df9d5ac90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= Date: Wed, 28 Jul 2021 19:14:43 +0000 Subject: [PATCH] Use more RMQ flags for less busy wait As mentioned in the Iced014acee7e590c10848e73feca166f48b622dc commit message, in Ussuri+ we can use ``+sbwtdcpu none +sbwtdio none`` as well. This is due to relying on RMQ-provided erlang in version 23.x. This change adds the extra arguments by default. It should be backported down to Ussuri before we do a release with Iced014acee7e590c10848e73feca166f48b622dc. Change-Id: I32e247a6cb34d7f6763b544f247fd408dce2b3a2 --- ansible/roles/rabbitmq/defaults/main.yml | 2 +- doc/source/reference/message-queues/rabbitmq.rst | 7 ++++--- etc/kolla/globals.yml | 4 ++-- .../notes/reduce-rabbit-busy-waiting-085433c822165eab.yaml | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ansible/roles/rabbitmq/defaults/main.yml b/ansible/roles/rabbitmq/defaults/main.yml index 8f26c353b1..b10c333473 100644 --- a/ansible/roles/rabbitmq/defaults/main.yml +++ b/ansible/roles/rabbitmq/defaults/main.yml @@ -85,7 +85,7 @@ rabbitmq_user: "openstack" rabbitmq_cluster_name: "openstack" rabbitmq_hostname: "{{ ansible_facts.hostname }}" rabbitmq_pid_file: "/var/lib/rabbitmq/mnesia/rabbitmq.pid" -rabbitmq_server_additional_erl_args: "+S 2:2 +sbwt none" +rabbitmq_server_additional_erl_args: "+S 2:2 +sbwt none +sbwtdcpu none +sbwtdio none" # Dict of TLS options for RabbitMQ. Keys will be prefixed with 'ssl_options.'. rabbitmq_tls_options: {} # To avoid split-brain diff --git a/doc/source/reference/message-queues/rabbitmq.rst b/doc/source/reference/message-queues/rabbitmq.rst index 8259fcc43a..b1114c4e08 100644 --- a/doc/source/reference/message-queues/rabbitmq.rst +++ b/doc/source/reference/message-queues/rabbitmq.rst @@ -97,7 +97,7 @@ already configures RabbitMQ server for IPv6 (if necessary). Any argument can be passed there as documented in https://www.rabbitmq.com/runtime.html The default value for ``rabbitmq_server_additional_erl_args`` is ``+S 2:2 +sbwt -none``. +none +sbwtdcpu none +sbwtdio none``. By default RabbitMQ starts N schedulers where N is the number of CPU cores, including hyper-threaded cores. This is fine when you assume all CPUs are @@ -106,5 +106,6 @@ Here we go for two scheduler threads (``+S 2:2``). More details can be found here: https://www.rabbitmq.com/runtime.html#scheduling and here: https://erlang.org/doc/man/erl.html#emulator-flags -The ``+sbwt`` argument prevents busy waiting of the scheduler, for more details -see: https://www.rabbitmq.com/runtime.html#busy-waiting. +The ``+sbwt none +sbwtdcpu none +sbwtdio none`` arguments prevent busy waiting +of the scheduler, for more details see: +https://www.rabbitmq.com/runtime.html#busy-waiting. diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index 98cc3eb55b..20a4818930 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -417,8 +417,8 @@ # https://www.rabbitmq.com/runtime.html#scheduling # https://www.rabbitmq.com/runtime.html#busy-waiting # The default tells RabbitMQ to always use two cores (+S 2:2), -# and not to busy wait (+sbwt none): -#rabbitmq_server_additional_erl_args: "+S 2:2 +sbwt none" +# and not to busy wait (+sbwt none +sbwtdcpu none +sbwtdio none): +#rabbitmq_server_additional_erl_args: "+S 2:2 +sbwt none +sbwtdcpu none +sbwtdio none" # Whether to enable TLS encryption for RabbitMQ client-server communication. #rabbitmq_enable_tls: "no" # CA certificate bundle in RabbitMQ container. diff --git a/releasenotes/notes/reduce-rabbit-busy-waiting-085433c822165eab.yaml b/releasenotes/notes/reduce-rabbit-busy-waiting-085433c822165eab.yaml index 4f83fd1055..ad913bec7e 100644 --- a/releasenotes/notes/reduce-rabbit-busy-waiting-085433c822165eab.yaml +++ b/releasenotes/notes/reduce-rabbit-busy-waiting-085433c822165eab.yaml @@ -10,4 +10,4 @@ fixes: upgrade: - | Modifies the default value of ``rabbitmq_server_additional_erl_args`` from - an empty string to ``+S 2:2 +sbwt none``. + an empty string to ``+S 2:2 +sbwt none +sbwtdcpu none +sbwtdio none``.