From dba99ea974ccfa59c8701a64731ae3b72a226122 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Wed, 8 Jul 2020 19:22:29 +0100 Subject: Performance: Split out prometheus node exporter and cadvisor Executing tasks has a performance penalty, even if they are skipped [1]. The prometheus role deploys a few types of services: * core prometheus server and alert manager services * centralised service-based exporters (mysql, memcached, OpenStack, etc.) * distributed node-based exporters (node exporter, cadvisor) that are deployed to all hosts There is a significant overhead in executing the tasks associated with the core services and centralised exporters against all hosts, even though they are skipped. This change extracts the node exporter and cadvisor deployment into a new prometheus-node-exporters role, to avoid executing the prometheus role against all hosts. The new role is lightweight, and has a small number of tasks, which should significantly improve performance. [1] https://github.com/stackhpc/ansible-scaling/blob/master/doc/skip.md Partially-Implements: blueprint performance-improvements Change-Id: I6913756ff85b7cc626d50ce16d55085d3683db17 Signed-off-by: Bartosz Bezak --- ansible/site.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'ansible/site.yml') diff --git a/ansible/site.yml b/ansible/site.yml index 6c8755e80..1f6f409d6 100644 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -440,10 +440,8 @@ gather_facts: false hosts: - prometheus - - prometheus-node-exporter - prometheus-mysqld-exporter - prometheus-memcached-exporter - - prometheus-cadvisor - prometheus-alertmanager - prometheus-openstack-exporter - prometheus-elasticsearch-exporter @@ -459,6 +457,22 @@ - { role: prometheus, tags: prometheus } +- name: Apply role prometheus-node-exporters + gather_facts: false + hosts: + - prometheus-node-exporter + - prometheus-cadvisor + - '&enable_prometheus_True' + serial: '{{ kolla_serial|default("0") }}' + max_fail_percentage: >- + {{ prometheus_node_exporters_max_fail_percentage | + default(kolla_max_fail_percentage) | + default(100) }} + roles: + - { role: prometheus-node-exporters, + tags: [prometheus, prometheus-node-exporters], + when: enable_prometheus | bool } + - name: Apply role iscsi gather_facts: false hosts: -- cgit v1.2.3