리눅스 튜닝 값 - 부하테스트 진행 하는 경우
부하테스트를 진행하는 중 서버에 튜닝을 해서 최적화를 해야 하죠!
부하발생기에서도 부하를 유입하기 위해서는 이 클라이언트도 튜닝을 해야 합니다.
리눅스 서버의 경우 , 아래 내용으로 셋팅을 다시 해야 충분히 부하발생기에서도 부하를 유지 할 수 있습니다.
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
#net.ipv4.conf.default.rp_filter = 2
#net.ipv4.conf.all.rp_filter = 2
net.ipv4.ip_forward = 1
net.ipv4.conf.lo.arp_ignore = 1
net.ipv4.conf.lo.arp_announce = 2
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
### TUNING NETWORK PERFORMANCE ###
# Default Socket Receive Buffer
#net.core.rmem_default = 31457280
net.core.rmem_default = 253952
# Maximum Socket Receive Buffer
#net.core.rmem_max = 12582912
net.core.rmem_max = 16777216
# Default Socket Send Buffer
#net.core.wmem_default = 31457280
net.core.wmem_default = 253952
# Maximum Socket Send Buffer
#net.core.wmem_max = 12582912
net.core.wmem_max = 16777216
# Increase number of incoming connections
net.core.somaxconn = 65535
# Increase number of incoming connections backlog
net.core.netdev_max_backlog = 65536
# Increase the maximum amount of option memory buffers
net.core.optmem_max = 25165824
# Increase the maximum total buffer-space allocatable
# This is measured in units of pages (4096 bytes)
net.ipv4.tcp_mem = 65536 131072 262144
net.ipv4.udp_mem = 65536 131072 262144
# Increase the read-buffer space allocatable
#net.ipv4.tcp_rmem = 8192 87380 16777216
net.ipv4.tcp_rmem = 253952 253952 16777216
net.ipv4.udp_rmem_min = 16384
# Increase the write-buffer-space allocatable
#net.ipv4.tcp_wmem = 8192 65536 16777216
net.ipv4.tcp_wmem = 253952 253952 16777216
net.ipv4.udp_wmem_min = 16384
# Increase the tcp-time-wait buckets pool size to prevent simple DOS attacks
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_max_tw_buckets = 131072
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_keepalive_probes = 9
net.ipv4.tcp_keepalive_time = 10
net.ipv4.tcp_orphan_retries = 0
net.ipv4.tcp_fin_timeout = 2
#net.ipv4.tcp_window_scaling = 1
#net.ipv4.tcp_timestamps = 1
#net.ipv4.tcp_max_tw_buckets = 1440000
#net.ipv4.tcp_tw_recycle = 0
#net.ipv4.tcp_tw_reuse = 1
#net.ipv4.tcp_keepalive_intvl = 75
#net.ipv4.tcp_keepalive_probes = 9
#net.ipv4.tcp_keepalive_time = 7200
#net.ipv4.tcp_orphan_retries = 0
#net.ipv4.tcp_fin_timeout = 60