sysctl.conf -> sysctl.d/*.conf

This commit is contained in:
Kolan Sh 2013-12-03 16:12:37 +04:00
parent b0f8adc1d7
commit d87aeb9d8f
4 changed files with 44 additions and 46 deletions

View File

@ -1,46 +0,0 @@
### --- OPTIMIZATION --- ###
# swap usage (default = 60)
vm.swappiness = 5
# (default = 100)
vm.vfs_cache_pressure = 1000
# http://www.linux.org.ru/wiki/en/User:shimon/12309
# reduce memory size allowed to process (default = 0 )
vm.overcommit_memory = 2
# memory allowed to process: total_swap + total_ram * overcommit_ratio / 100 (default = 50 )
vm.overcommit_ratio = 50
# disk buffer size (default = 0 )
vm.dirty_bytes = 1048576
# disk buffer size (default = 0 )
vm.dirty_background_bytes = 1048576
# (default = 40)
vm.dirty_ratio = 20
# (default = 10)
vm.dirty_background_ratio = 5
# -- more 12309 tricks --
# (default = 3000)
vm.dirty_expire_centisecs = 1000
# (default = 500)
vm.dirty_writeback_centisecs = 200
### ----- SECURITY ----- ###
# enable ip forwarding (default = 0)
net.ipv4.ip_forward = 0
# enable filtering by source IP address (default = 0)
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
# accept ICMP-messages for routes (default = 1)
net.ipv4.conf.default.accept_redirects = 0
# enable secure redirects (default = 1)
net.ipv4.conf.all.secure_redirects = 1
# allow sender to define route (default = 0)
net.ipv4.conf.default.accept_source_route = 0
### ------ OTHER ------- ###
# reboot on kernel panic, seconds (default = 0)
kernel.panic = 5
# several multimedia apps require this option
kernel.shmmax = 2147483647
# laptop mode (default = 5)
vm.laptop_mode=5

24
sysctl.d/12309.conf Normal file
View File

@ -0,0 +1,24 @@
# swap usage (default = 60)
vm.swappiness = 5
# http://www.linux.org.ru/wiki/en/User:shimon/12309
# reduce memory size allowed to process (default = 0 )
vm.overcommit_memory = 2
# memory allowed to process: total_swap + total_ram * overcommit_ratio / 100 (default = 50 )
vm.overcommit_ratio = 80
# disk buffer size (default = 0 )
vm.dirty_bytes = 2097152
# disk buffer size (default = 0 )
vm.dirty_background_bytes = 2097152
# (default = 100)
vm.vfs_cache_pressure = 50
# (default = 40)
vm.dirty_ratio = 3
# (default = 10)
vm.dirty_background_ratio = 3
# -- more 12309 tricks --
# (default = 3000)
vm.dirty_expire_centisecs = 1000
# (default = 500)
vm.dirty_writeback_centisecs = 200

13
sysctl.d/net.conf Normal file
View File

@ -0,0 +1,13 @@
# ip forwarding (default = 0)
net.ipv4.ip_forward = 0
# filtering by source IP address (default = 0)
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
# ICMP-messages for routes (default = 1)
net.ipv4.conf.default.accept_redirects = 0
# enable secure redirects (default = 1)
net.ipv4.conf.all.secure_redirects = 1
# forbid sender to define route (default = 0)
net.ipv4.conf.default.accept_source_route = 0

7
sysctl.d/other.conf Normal file
View File

@ -0,0 +1,7 @@
### ------ OTHER ------- ###
# reboot on kernel panic, seconds (default = 0)
kernel.panic = 5
# several multimedia apps require this option
kernel.shmmax = 2147483647
# laptop mode (default = 5)
vm.laptop_mode=5