From fb6a07b46bd3df4c87403aeec0f70600903c0944 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Thu, 27 Aug 2015 19:46:11 +0000 Subject: [PATCH] Give bodhi2 backend another consumer thread. --- inventory/group_vars/bodhi-backend | 2 ++ inventory/group_vars/bodhi-backend-stg | 2 ++ roles/bodhi2/base/tasks/main.yml | 1 + roles/bodhi2/base/templates/bodhi-threading.py | 10 ++++++++++ roles/fedmsg/base/templates/endpoints-bodhi.py.j2 | 4 ++-- 5 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 roles/bodhi2/base/templates/bodhi-threading.py diff --git a/inventory/group_vars/bodhi-backend b/inventory/group_vars/bodhi-backend index cae657e59d..7a18cfcb10 100644 --- a/inventory/group_vars/bodhi-backend +++ b/inventory/group_vars/bodhi-backend @@ -26,6 +26,8 @@ virt_install_command: virt-install -n {{ inventory_hostname }} -r {{ mem_size }} tcp_ports: [ 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, + 3010, 3011, 3012, 3013, 3014, + 3015, 3016, 3017, 3018, 3019, ] # With 16 cpus, theres a bunch more kernel threads diff --git a/inventory/group_vars/bodhi-backend-stg b/inventory/group_vars/bodhi-backend-stg index b5d1d224c5..a92280912d 100644 --- a/inventory/group_vars/bodhi-backend-stg +++ b/inventory/group_vars/bodhi-backend-stg @@ -25,6 +25,8 @@ virt_install_command: virt-install -n {{ inventory_hostname }} -r {{ mem_size }} tcp_ports: [ 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, + 3010, 3011, 3012, 3013, 3014, + 3015, 3016, 3017, 3018, 3019, ] # With 16 cpus, theres a bunch more kernel threads diff --git a/roles/bodhi2/base/tasks/main.yml b/roles/bodhi2/base/tasks/main.yml index ff6f79fb4e..1d7ec11b42 100644 --- a/roles/bodhi2/base/tasks/main.yml +++ b/roles/bodhi2/base/tasks/main.yml @@ -67,6 +67,7 @@ mode=0644 with_items: - bodhi-logging.py + - bodhi-threading.py - bodhi.py - masher.py notify: diff --git a/roles/bodhi2/base/templates/bodhi-threading.py b/roles/bodhi2/base/templates/bodhi-threading.py new file mode 100644 index 0000000000..574f054128 --- /dev/null +++ b/roles/bodhi2/base/templates/bodhi-threading.py @@ -0,0 +1,10 @@ +config = { + # This sets uptwo master threads to handle incoming messages. + # Each of those master consumer threads then can fork off many masher + # threads to mash different repos. + # If you crank up this number, you should also crank up: + # - the iptables rules in inventory/group_vars/bodhi-backend + # - the fedmsg endpoints in roles/fedmsg/base/templates/endpoints-bodhi.py + "moksha.workers_per_consumer": 2, + "moksha.threadpool_size": 22, +} diff --git a/roles/fedmsg/base/templates/endpoints-bodhi.py.j2 b/roles/fedmsg/base/templates/endpoints-bodhi.py.j2 index 7cf547f2b4..a69ac46322 100644 --- a/roles/fedmsg/base/templates/endpoints-bodhi.py.j2 +++ b/roles/fedmsg/base/templates/endpoints-bodhi.py.j2 @@ -9,12 +9,12 @@ config = dict( endpoints={ "bodhi.bodhi-backend01": [ "tcp://bodhi-backend01.%s:30%0.2i" % (suffix, i) - for i in range(10) + for i in range(20) ], {% if env != 'staging' %} "bodhi.bodhi-backend02": [ "tcp://bodhi-backend02.%s:30%0.2i" % (suffix, i) - for i in range(10) + for i in range(20) ], {% endif %} }