Change the default thread pool size
In testing ironic it w/ mod-wsgi I've found that ironic does not pool connections to the messaging backend. This causes connection and intermitent issues within the ironic service. To mitigate these issues I've changed the ironic_wsgi_threads variable from using vcpus*2 to using vcpus//4 which will instruct the ironic process to only use 25% of the available vcpus rounded to the nearest whole number. A ternary operation was added to the default value to ensure the computed value is greater than or equal to 1. Error Example: XXX_ironic_conductor_container-XXX ironic-conductor: 2016-04-07 14:32:32.016 555 ERROR oslo.messaging._drivers.impl_rabbit [-] AMQP server on 172.19.102.219:5671 is unreachable: Basic.cancel: (0) 1. Trying again in 1 seconds. With a reduced thread count this error was resolved. My hosts have 48vCPUs resulting in 96 threads being used in the process. Change-Id: I0390f0d3f5d90f851f5373962c4b924d3ade72ff Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
f5f4621db2
commit
649c4ea122
@ -154,7 +154,8 @@ ironic_service_user_name: "ironic"
|
||||
|
||||
# Apache settings
|
||||
ironic_wsgi_threads: 1
|
||||
ironic_wsgi_processes: "{{ ansible_processor_vcpus | default (1) * 2 }}"
|
||||
_ironic_wsgi_processes: "{{ ansible_processor_vcpus | default(1) // 4 }}"
|
||||
ironic_wsgi_processes: "{{ (_ironic_wsgi_processes | int > 1) | ternary(_ironic_wsgi_processes, 1) }}"
|
||||
|
||||
### OpenStack Services to integrate with
|
||||
|
||||
|
@ -1893,7 +1893,7 @@ rabbit_virtual_host={{ ironic_rabbitmq_vhost }}
|
||||
|
||||
# Maximum number of connections to keep queued. (integer
|
||||
# value)
|
||||
#pool_max_size=10
|
||||
pool_max_size = {{ ironic_wsgi_processes }}
|
||||
|
||||
# Maximum number of connections to create above
|
||||
# `pool_max_size`. (integer value)
|
||||
|
Loading…
Reference in New Issue
Block a user