월요일, 7월 22, 2024
HomeLinuxubuntu ulimit 설정

ubuntu ulimit 설정

ubuntu ulimit 설정

/etc/security/limits.conf file를 수정하여 설정합니다.


cat /etc/security/limits.conf

*        soft    nofile    999999
*        hard    nofile    999999
root     soft    nofile    999999
root     hard    nofile    999999

적용후 재로그인후 적용됩니다.

확인방법

#hard open file

root@ubuntu:~# ulimit -Ha

core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 7774
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 999999
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) unlimited
cpu time               (seconds, -t) unlimited
max user processes              (-u) 7774
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

#soft open file

root@ubuntu:~# ulimit -Sa

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 7774
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 999999
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 7774
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular