Implement tunable Ceilometer workers

This patch introduces an override for the number of Ceilometer workers:
 - ceilometer_api_workers
 - ceilometer_collector_workers
 - ceilometer_notification_workers

The values may be set in /etc/openstack_deploy/user_variables.yml
and if they are unset, half the number of available vCPU's will be
used instead.

Backport Note:
The var locations were changed in the following patch and apply to
Liberty+ only:
 - https://review.openstack.org/209333

Implements: blueprint gate-split
Change-Id: I126d735b737237cde27dde8a864e945d037e2e4a
This commit is contained in:
Jesse Pretorius 2015-11-25 20:08:57 +00:00
parent 6265a38c67
commit b51c300edd
2 changed files with 14 additions and 1 deletions

View File

@ -79,6 +79,10 @@ ceilometer_service_adminuri: "{{ ceilometer_service_proto }}://{{ internal_lb_vi
ceilometer_service_adminurl: "{{ ceilometer_service_adminuri }}"
## Ceilometer config
# If the following variables are unset in user_variables, the value set will be half the number of available VCPUs
# ceilometer_api_workers: 1
# ceilometer_collector_workers: 1
# ceilometer_notification_workers: 1
# Common apt packages
ceilometer_apt_packages:

View File

@ -1,8 +1,10 @@
#{{ ansible_managed}}
{% set _workers = ansible_processor_vcpus|default(2) // 2 %}
{% set workers = _workers if _workers > 0 else 1 %}
[DEFAULT]
auth_strategy = keystone
collector_workers = 10
notification_topics = notifications
rpc_backend = rabbit
@ -19,8 +21,15 @@ rabbit_hosts = {{ rabbitmq_servers }}
rabbit_use_ssl = {{ rabbitmq_use_ssl }}
[api]
workers = {{ ceilometer_api_workers | default(workers) }}
port = 8777
[collector]
workers = {{ ceilometer_collector_workers | default(workers) }}
[notification]
workers = {{ ceilometer_notification_workers | default(workers) }}
[database]
metering_connection = {{ ceilometer_connection_string }}
event_connection = {{ ceilometer_connection_string }}