728x90
반응형
swappiness변경
sysctl vm.swappiness
echo 0 > /proc/sys/vm/swappiness
vi /etc/sysctl.conf
cat /etc/sysctl.conf | grep swappiness
# swap
vm.swappiness = 0
#vm.swappiness = 60
ulimit의 open files 변경
1. add end of line
# vi /etc/sysctl.conf
# open files in Linux
fs.file-max = 65536
2. add end of line
# vi /etc/security/limits.conf
root soft nofile 64000
root hard nofile 64000
root soft nproc 64000
root hard nproc 64000
65536에 설정하는 경우
root soft nofile 65536
root hard nofile 65536
root soft nproc 65536
root hard nproc 65536
root soft nofile 65500
root hard nofile 65500
root soft nproc 44769
root hard nproc 44769
최대 이용자 수 변경
ulimit -u 65536
최대 오픈 파일 수 변경
ulimit -n 65536
ulimit-a에서 확인
overcommit_memory 확인
sysctl vm.overcommit_memory
vm.overcommit_memory의 값을 1로 변경
echo 1 > /proc/sys/vm/overcommit_memory
sysctl -w vm.overcommit_memory=1
cat /proc/sys/vm/overcommit_memory
overcommit memory설정
# vi /etc/sysctl.conf
# overcommit memory
vm.overcommit_memory = 1
vm.overcommit_ratio = 99
transparent_hugepage비활성화
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag
728x90
300x250