object::tweaking: Use the proper kernel configuration
Currently the module was using incorrect kernel parameters on RedHat platforms: * net.ipv4.netfilter.ip_conntrack_max * net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait * net.ipv4.netfilter.ip_conntrack_tcp_timeout_close_wait Those parameters has been renamed to match the proper nf_conntrack parameters[1] [1] https://www.kernel.org/doc/Documentation/networking/nf_conntrack-sysctl.txt Change-Id: I2c3c3edd30ec5c5ad92acb39dc7e0eec99ad12f7
This commit is contained in:
@@ -19,22 +19,38 @@ class cloud::object::tweaking {
|
|||||||
kmod::load { 'ip_conntrack': }
|
kmod::load { 'ip_conntrack': }
|
||||||
|
|
||||||
$swift_tuning = {
|
$swift_tuning = {
|
||||||
'net.ipv4.tcp_tw_recycle' => { value => 1 },
|
'net.ipv4.tcp_tw_recycle' => { value => 1 },
|
||||||
'net.ipv4.tcp_tw_reuse' => { value => 1 },
|
'net.ipv4.tcp_tw_reuse' => { value => 1 },
|
||||||
'net.ipv4.tcp_syncookies' => { value => 0 },
|
'net.ipv4.tcp_syncookies' => { value => 0 },
|
||||||
'net.ipv4.netfilter.ip_conntrack_max' => { value => 524288 },
|
'net.ipv4.ip_local_port_range' => { value => "1024\t65000" },
|
||||||
'net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait' => { value => 2 },
|
'net.core.netdev_max_backlog' => { value => 300000 },
|
||||||
'net.ipv4.netfilter.ip_conntrack_tcp_timeout_close_wait' => { value => 2 },
|
'net.ipv4.tcp_sack' => { value => 0 },
|
||||||
'net.ipv4.ip_local_port_range' => { value => "1024\t65000" },
|
}
|
||||||
'net.core.netdev_max_backlog' => { value => 300000 },
|
|
||||||
'net.ipv4.tcp_sack' => { value => 0 },
|
case $::osfamily {
|
||||||
|
'Debian' : {
|
||||||
|
$debian_swift_tuning = {
|
||||||
|
'net.ipv4.netfilter.ip_conntrack_max' => { value => 524288 },
|
||||||
|
'net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait' => { value => 2 },
|
||||||
|
'net.ipv4.netfilter.ip_conntrack_tcp_timeout_close_wait' => { value => 2 },
|
||||||
|
}
|
||||||
|
$swift_tuning_real = merge($swift_tuning, $debian_swift_tuning)
|
||||||
|
}
|
||||||
|
default : {
|
||||||
|
$redhat_swift_tuning = {
|
||||||
|
'net.netfilter.nf_conntrack_max' => { value => 524288 },
|
||||||
|
'net.netfilter.nf_conntrack_tcp_timeout_time_wait' => { value => 2 },
|
||||||
|
'net.netfilter.nf_conntrack_tcp_timeout_close_wait' => { value => 2 },
|
||||||
|
}
|
||||||
|
$swift_tuning_real = merge($swift_tuning, $redhat_swift_tuning)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$require = {
|
$require = {
|
||||||
require => Kmod::Load['ip_conntrack']
|
require => Kmod::Load['ip_conntrack']
|
||||||
}
|
}
|
||||||
|
|
||||||
create_resources(sysctl::value,$swift_tuning,$require)
|
create_resources(sysctl::value,$swift_tuning_real,$require)
|
||||||
|
|
||||||
file { '/var/log/swift':
|
file { '/var/log/swift':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
|
Reference in New Issue
Block a user