Update prefork MPM apache settings

Tweeaked apache connection settings on prefork MPM to allow better
performance at larger client volumes and server sizes. Make this
safe for Trusty as well, for ease of upgrading in the near future.

Change-Id: I0f52eabc8218b12392a2ac75d3ce3a5a85e01df5
This commit is contained in:
Sebastian Marcet 2016-03-23 16:15:56 -03:00 committed by Jeremy Stanley
parent d738f5647d
commit 638c790997
2 changed files with 78 additions and 3 deletions

View File

@ -0,0 +1,17 @@
# prefork MPM
# StartServers: initial number of server processes to start
# MinSpareServers: minimum number of worker threads which are kept spare
# MaxSpareServers: maximum number of worker threads which are kept spare
# MaxClients: maximum number of simultaneous client connections (MaxClients should always be <= ServerLimit)
# ServerLimit:is only used if you need to set MaxClients higher than 256 (default). Do not set the value of this
# directive any higher than what you might want to set MaxClients to.
# MaxRequestsPerChild: maximum number of requests a server process serves
# if you are unable to determine this information the standard 1000 should be used.
<IfModule mpm_prefork_module>
StartServers 3
MinSpareServers 96
MaxSpareServers 192
MaxClients 1024
ServerLimit 1024
MaxRequestsPerChild 1000
</IfModule>

View File

@ -218,7 +218,7 @@ class openstackid (
group => 'root',
mode => '0640',
content => $ssl_cert_file_contents,
notify => Service['apache2'],
notify => Service['httpd'],
before => Httpd::Vhost[$vhost_name],
}
}
@ -229,7 +229,7 @@ class openstackid (
group => 'root',
mode => '0640',
content => $ssl_key_file_contents,
notify => Service['apache2'],
notify => Service['httpd'],
before => Httpd::Vhost[$vhost_name],
}
}
@ -240,11 +240,69 @@ class openstackid (
group => 'root',
mode => '0640',
content => $ssl_chain_file_contents,
notify => Service['apache2'],
notify => Service['httpd'],
before => Httpd::Vhost[$vhost_name],
}
}
file { '/etc/apache2':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
}
if ($::lsbdistcodename == 'precise') {
file { '/etc/apache2/conf.d':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
require => File['/etc/apache2'],
}
file { '/etc/apache2/conf.d/connection-tuning':
ensure => present,
owner => 'root',
group => 'root',
mode => '0644',
source => 'puppet:///modules/openstackid/apache-connection-tuning',
notify => Service['httpd'],
require => File['/etc/apache2/conf.d'],
}
} else {
file { '/etc/apache2/conf-available':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
require => File['/etc/apache2'],
}
file { '/etc/apache2/conf-available/connection-tuning':
ensure => present,
owner => 'root',
group => 'root',
mode => '0644',
source => 'puppet:///modules/openstackid/apache-connection-tuning',
require => File['/etc/apache2/conf-available'],
}
file { '/etc/apache2/conf-enabled':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
require => File['/etc/apache2'],
}
file { '/etc/apache2/conf-enabled/connection-tuning':
ensure => link,
target => '/etc/apache2/conf-available/connection-tuning.conf',
notify => Service['httpd'],
require => [
File['/etc/apache2/conf-enabled'],
File['/etc/apache2/conf-available/connection-tuning'],
],
}
}
deploy { 'deploytool':
}