Add support to tune the keystone apache MPM settings

This fix adds support to tune the apache MPM server settings
in case more HTTP threads are needed.

New overrides have been predefined in order to use the Ubuntu
default settings:

     keystone_httpd_mpm_backend: event
     keystone_httpd_mpm_start_servers: 2
     keystone_httpd_mpm_min_spare_threads: 25
     keystone_httpd_mpm_max_spare_threads: 75
     keystone_httpd_mpm_thread_limit: 64
     keystone_httpd_mpm_thread_child: 25
     keystone_httpd_mpm_max_requests: 150
     keystone_httpd_mpm_max_conn_child: 0

Change-Id: Ieaad4d2b3c62a5b59e1fa597816ab1b4c2fc3cb1
Closes-Bug: #1576399
This commit is contained in:
Bjoern Teipel 2016-04-28 15:30:56 -05:00 committed by Travis Truman
parent cdd4cb6c01
commit 7704d94c74
4 changed files with 38 additions and 1 deletions

View File

@ -164,6 +164,16 @@ keystone_apache_serversignature: "Off"
keystone_wsgi_threads: 1
keystone_wsgi_processes: "{{ ansible_processor_vcpus | default (1) * 2 }}"
## Apache MPM tunables
keystone_httpd_mpm_backend: event
keystone_httpd_mpm_start_servers: 2
keystone_httpd_mpm_min_spare_threads: 25
keystone_httpd_mpm_max_spare_threads: 75
keystone_httpd_mpm_thread_limit: 64
keystone_httpd_mpm_thread_child: 25
keystone_httpd_mpm_max_requests: 150
keystone_httpd_mpm_max_conn_child: 0
# set keystone_ssl to true to enable SSL configuration on the keystone containers
keystone_ssl: false
keystone_ssl_cert: /etc/ssl/certs/keystone.pem

View File

@ -0,0 +1,17 @@
---
features:
- |
Apache MPM tunable support has been added to the os-keystone
role in order to allow MPM thread tuning.
Default values reflect the current Ubuntu default settings:
.. code-block:: yaml
keystone_httpd_mpm_backend: event
keystone_httpd_mpm_start_servers: 2
keystone_httpd_mpm_min_spare_threads: 25
keystone_httpd_mpm_max_spare_threads: 75
keystone_httpd_mpm_thread_limit: 64
keystone_httpd_mpm_thread_child: 25
keystone_httpd_mpm_max_requests: 150
keystone_httpd_mpm_max_conn_child: 0

View File

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Drop apache2 ports file
- name: Drop apache2 config files
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
@ -22,6 +22,7 @@
with_items:
- { src: "keystone-ports.conf.j2", dest: "/etc/apache2/ports.conf" }
- { src: "keystone-httpd.conf.j2", dest: "/etc/apache2/sites-available/keystone-httpd.conf" }
- { src: "keystone-httpd-mpm.conf.j2", dest: "/etc/apache2/mods-available/mpm_{{ keystone_httpd_mpm_backend }}.conf" }
notify:
- Restart Apache
tags:

View File

@ -0,0 +1,9 @@
<IfModule mpm_{{ keystone_httpd_mpm_backend }}_module>
StartServers {{ keystone_httpd_mpm_start_servers }}
MinSpareThreads {{ keystone_httpd_mpm_min_spare_threads }}
MaxSpareThreads {{ keystone_httpd_mpm_max_spare_threads }}
ThreadLimit {{ keystone_httpd_mpm_thread_limit }}
ThreadsPerChild {{ keystone_httpd_mpm_thread_child }}
MaxRequestWorkers {{ keystone_httpd_mpm_max_requests }}
MaxConnectionsPerChild {{ keystone_httpd_mpm_max_conn_child }}
</IfModule>