Skip to content

Commit 8eaa628

Browse files
lukeseawalkerdemartinofra
authored andcommitted
Increase somaxconn and tcp_max_syn_backlog persistently
sysctl chef resource https://docs.chef.io/resources/sysctl/ is used to set and persist the settings Signed-off-by: Luca Carrogu <[email protected]>
1 parent 4c7009f commit 8eaa628

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

recipes/base_config.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
end
2525

2626
# Increase somaxconn and tcp_max_syn_backlog for large scale setting
27-
execute "increase somaxconn" do
28-
command "echo '65535' > /proc/sys/net/core/somaxconn"
27+
sysctl 'net.core.somaxconn' do
28+
value 65535
2929
end
3030

31-
execute "increase tcp_max_syn_backlog" do
32-
command "echo '65535' > /proc/sys/net/ipv4/tcp_max_syn_backlog"
31+
sysctl 'net.ipv4.tcp_max_syn_backlog' do
32+
value 65535
3333
end
3434

3535
# Amazon Time Sync

0 commit comments

Comments
 (0)