Control amount of metricd workers

As of today we didn't manage amount of gnocchi-metricd that equal to
amount of CPU on host. So things can go off regarding CPU and memory
consumption. For better control of ressources we add a variable to
control the number of workers.

Change-Id: Idcaec649a4de03f5714c61fda694ada45da41dbc
This commit is contained in:
Marc Gariepy 2022-06-17 08:24:35 -04:00
parent c845819cae
commit 2be06894c8
3 changed files with 11 additions and 1 deletions

View File

@ -139,6 +139,9 @@ gnocchi_wsgi_threads: 1
gnocchi_wsgi_processes_max: 16
gnocchi_wsgi_processes: "{{ [[(ansible_facts['processor_vcpus']//ansible_facts['processor_threads_per_core'])|default(1), 1] | max * 2, gnocchi_wsgi_processes_max] | min }}"
gnocchi_metricd_workers_max: 16
gnocchi_metricd_workers: "{{ [[(ansible_facts['processor_vcpus']//ansible_facts['processor_threads_per_core'])|default(1), 1] | max * 2, gnocchi_metricd_workers_max] | min }}"
gnocchi_uwsgi_conf_overrides: {}
gnocchi_api_init_overrides: {}
gnocchi_metricd_init_overrides: {}

View File

@ -0,0 +1,7 @@
---
features:
- |
Implemented variable ``gnocchi_metricd_workers`` that is designed to
controll amount of gnocchi-metricd workers spawned. By default it is
equal to number of CPU cores, but no more than 16 workers.

View File

@ -124,7 +124,7 @@ redis_url = {{ gnocchi_incoming_redis_url }}
# Number of workers for Gnocchi metric daemons. By default the available number
# of CPU is used. (integer value)
# Minimum value: 1
#workers = 1
workers = {{ gnocchi_metricd_workers }}
[statsd]
# The listen IP for statsd (string value)