Skip to content

Instantly share code, notes, and snippets.

@guilhermeblanco
Created August 8, 2014 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guilhermeblanco/bf1393ef526cd15fd89c to your computer and use it in GitHub Desktop.
Save guilhermeblanco/bf1393ef526cd15fd89c to your computer and use it in GitHub Desktop.
company::sysctl::sysctls:
'net.ipv4.tcp_keepalive_time':
value: "30"
'net.ipv4.tcp_keepalive_probes':
value: "5"
'net.ipv6.bindv6only':
value: "0"
'net.core.wmem_max':
value: "16777216"
'net.core.rmem_max':
value: "16777216"
'net.ipv4.tcp_rmem':
value: "4096 87380 16777216"
'net.ipv4.tcp_wmem':
value: "4096 87380 16777216"
'net.ipv4.tcp_window_scaling':
value: "1"
'net.ipv4.tcp_timestamps':
value: "1"
'net.ipv4.tcp_sack':
value: "1"
'net.ipv4.tcp_no_metrics_save':
value: "1"
'net.core.netdev_max_backlog':
value: "5000"
'net.ipv4.tcp_fin_timeout':
value: "5"
'fs.file-max':
value: "398280"
'vm.swappiness':
value: "0"
class company::sysctl(
$sysctls = {},
) {
create_resources(sysctl, $sysctls)
}
---
:backends:
- yaml
:hierarchy:
- "%{::hostname}"
- "%{::environment}"
- common
:yaml:
:datadir: /etc/puppet/nodes
:merge_behavior: deeper
company::sysctl::sysctls:
'net.core.wmem_default':
value: "8388608"
'net.core.rmem_default':
value: "8388608"
'net.core.netdev_max_backlog':
value: "10000"
'net.core.somaxconn':
value: "4000"
'net.ipv4.tcp_max_syn_backlog':
value: "40000"
'net.ipv4.tcp_tw_reuse':
value: "1"
define sysctl (
$value = undef,
$ensure = undef
) {
# ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment