From 80786e0d2390eef3f1a9404f42a6cb3306d38314 Mon Sep 17 00:00:00 2001 From: gordon chung Date: Wed, 23 Jul 2014 14:06:31 -0400 Subject: [PATCH] enable multiple collector workers currently, a single worker thread writes received samples into database. this is fine for most occasions but during message spikes, it is not enough. this patch increase amount of workers to half the number of processors (so we can ensure ceilometer maintains lightweight design) this will also help validate mulitple worker setup works. Partial-Bug: #1336755 Change-Id: I33037f2f9ebfda43238e5cd0cff75adbed65d055 --- lib/ceilometer | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ceilometer b/lib/ceilometer index 7bd1421118..4030aca9a1 100644 --- a/lib/ceilometer +++ b/lib/ceilometer @@ -154,6 +154,7 @@ function configure_ceilometer { if [ "$CEILOMETER_BACKEND" = 'mysql' ] || [ "$CEILOMETER_BACKEND" = 'postgresql' ] ; then iniset $CEILOMETER_CONF database connection `database_connection_url ceilometer` + iniset $CEILOMETER_CONF DEFAULT collector_workers $(( ($(nproc) + 1) / 2 )) else iniset $CEILOMETER_CONF database connection mongodb://localhost:27017/ceilometer configure_mongodb