Engineering/Linux
file descriptor 최대값 조정
부스 boos
2012. 2. 10. 16:45
728x90
리눅스에서 open 할 수 있는 file 또는 socket 의 갯수를 조정하기 위해 다음값들을 확인한다.
- shell 또는 script 들은 ulimit 로 조정할 수 있다.
# ulimit -n 102400
- 사용자 또는 어플리케이션은 /etc/security/limits.conf 의 값으로 조정할 수 있다.
# cat /etc/security/limits.conf
- 시스템값 조정
# cat /proc/sys/fs/file-max
# vi /etc/sysctl.conf
fs.file-max = 102400
# vi /etc/security/limits.conf
- 현재 사용중인 파일 갯수 확인
# cat /proc/sys/fs/file-nr
출처:
http://serverfault.com/questions/165316/how-to-configure-linux-file-descriptor-limit-with-fs-file-max-and-ulimit
http://sleepyhead.de/howto/?href=sysinfo
- shell 또는 script 들은 ulimit 로 조정할 수 있다.
# ulimit -n 102400
- 사용자 또는 어플리케이션은 /etc/security/limits.conf 의 값으로 조정할 수 있다.
# cat /etc/security/limits.conf
- 시스템값 조정
# cat /proc/sys/fs/file-max
# vi /etc/sysctl.conf
fs.file-max = 102400
# vi /etc/security/limits.conf
아래 내용 추가
* hard nofile 65000
* soft nofile 65000
- 현재 사용중인 파일 갯수 확인
# cat /proc/sys/fs/file-nr
출처:
http://serverfault.com/questions/165316/how-to-configure-linux-file-descriptor-limit-with-fs-file-max-and-ulimit
http://sleepyhead.de/howto/?href=sysinfo