Linux - ulimit 설정(Too many open files 오류)

Posted 12 21, 2015 18:13, Filed under: System/UNIX



ulimit는 각 유저의 파일 사용에 대해서 할당할 자원을 제한 하는 것으로,
다중 사용자및 프로그램을 기본으로 하는 Linux 시스템에서 특정 유저가 시스템 사용을 독점하는 것을 막아 주는 설정입니다.
주로 openfile, corefile 사이즈를 제어하는것에 사용합니다.

기본 hard, soft 설정이 있습니다.
sort 설정 : 새로운 프로그램 생성시 기본으로 적용되는 한도
hard 설정 : 소프트 설정 한도의 최대값
ulimit -aH      -- 하드 설정 조회
ulimit -aS       -- 소프트 설정 조회

[root@hdfs1 ~]# ulimit -aH
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 127904
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 4096
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) 127904
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

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

soft및 hart 설정 늘이기(전체 유저 대상)

[root@hdfs1 SampleData]# cat /etc/security/limits.conf
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain>     <type>  <item>  <value>
#

#*           soft core         0
#*           hard rss         10000
#@student     hard nproc       20
#@faculty     soft nproc       20
#@faculty     hard nproc       50
#ftp         hard nproc       0
#@student     -   maxlogins   4

*   hard nofile  10240
*   soft nofile  10240
# End of file

설정및 저장후 새로운 세션으로 접속을 하면 적용이 됩니다.

설정 내역 조회
[root@hdfs1 SampleData]# ulimit -aS
core file size       (blocks, -c) 0
data seg size       (kbytes, -d) unlimited
scheduling priority         (-e) 0
file size           (blocks, -f) unlimited
pending signals             (-i) 127904
max locked memory   (kbytes, -l) 64
max memory size     (kbytes, -m) unlimited
open files                   (-n) 1024
pipe size         (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority           (-r) 0
stack size           (kbytes, -s) 10240
cpu time           (seconds, -t) unlimited
max user processes           (-u) 127904
virtual memory       (kbytes, -v) unlimited
file locks                   (-x) unlimited

[root@hdfs1 SampleData]# ulimit -aH
core file size       (blocks, -c) unlimited
data seg size       (kbytes, -d) unlimited
scheduling priority         (-e) 0
file size           (blocks, -f) unlimited
pending signals             (-i) 127904
max locked memory   (kbytes, -l) 64
max memory size     (kbytes, -m) unlimited
open files                   (-n) 4096
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) 127904
virtual memory       (kbytes, -v) unlimited
file locks                   (-x) unlimited
[root@hdfs1 SampleData]# logout

> 로그아웃후에 새로운 세션 로그인
Last login: Mon Dec 21 10:37:19 2015 from 192.168.1.21
[root@hdfs1 ~]# ulimit -aS
core file size       (blocks, -c) 0
data seg size       (kbytes, -d) unlimited
scheduling priority         (-e) 0
file size           (blocks, -f) unlimited
pending signals             (-i) 127904
max locked memory   (kbytes, -l) 64
max memory size     (kbytes, -m) unlimited
open files                   (-n) 10240
pipe size         (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority           (-r) 0
stack size           (kbytes, -s) 10240
cpu time           (seconds, -t) unlimited
max user processes           (-u) 127904
virtual memory       (kbytes, -v) unlimited
file locks                   (-x) unlimited

[root@hdfs1 ~]# ulimit -aH
core file size       (blocks, -c) unlimited
data seg size       (kbytes, -d) unlimited
scheduling priority         (-e) 0
file size           (blocks, -f) unlimited
pending signals             (-i) 127904
max locked memory   (kbytes, -l) 64
max memory size     (kbytes, -m) unlimited
open files                   (-n) 10240
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) 127904
virtual memory       (kbytes, -v) unlimited
file locks                   (-x) unlimited
[root@hdfs1 ~]#



※ 위 내용은, 여러 자료를 참고하거나 제가 주관적으로 정리한 것입니다.
   잘못된 정보나 보완이 필요한 부분을, 댓글 또는 메일로 보내주시면 많은 도움이 되겠습니다.
12 21, 2015 18:13 12 21, 2015 18:13


Trackback URL : http://develop.sunshiny.co.kr/trackback/1047

  1. review

    Tracked from review 05 25, 2020 22:18 Delete

    Get here professional how to create tv channel currently open for service in addition on sale now!

  2. wedding dj bozeman mt

    Tracked from wedding dj bozeman mt 05 26, 2020 03:50 Delete

    Profit from professional wedding dj bozeman currently taking on new clients in addition on sale now!

  3. fishing outfitter in montana

    Tracked from fishing outfitter in montana 05 26, 2020 04:38 Delete

    Get here amazing get redirected here currently taking on new clients in addition on sale now!

  4. dog wheelchair cost

    Tracked from dog wheelchair cost 05 26, 2020 06:00 Delete

    Get here amazing this website currently open for service in addition on sale now!

  5. print & mail services

    Tracked from print & mail services 05 26, 2020 10:27 Delete

    Save money with amazing invoice printing and mailing services right now on sale and creates results now!

  6. my review here

    Tracked from my review here 05 26, 2020 15:27 Delete

    Get here expert montana outfitters fly fishing currently taking on new clients in addition reasonably priced now!

  7. bill printing and mailing

    Tracked from bill printing and mailing 05 27, 2020 14:20 Delete

    Save money with amazing statement mailing services right now on sale and gets your cash flowing now!

  8. synchronized clocks for stadiums

    Tracked from synchronized clocks for stadiums 05 27, 2020 16:15 Delete

    Save now the best public address speakers currently this week available and in stock in addition on sale this week only!

  9. utility bill print and mail service

    Tracked from utility bill print and mail service 05 28, 2020 14:12 Delete

    Get very professional print and mail services right now on sale and creates results now!

  10. print & mail services

    Tracked from print & mail services 05 30, 2020 08:11 Delete

    Save money with very professional Printed Invoice Mailing Service currently on sale and creates results now!

  11. printing and mail services

    Tracked from printing and mail services 06 3, 2020 14:25 Delete

    Get amazing bill printing services right now on sale and gets your cash flowing now!

  12. safety glasses

    Tracked from safety glasses 06 4, 2020 05:23 Delete

    Get here amazing safety gear supplierscurrently taking on new clients in addition reasonably priced now!

  13. safety accessories

    Tracked from safety accessories 06 5, 2020 07:36 Delete

    Profit from amazing visit website herecurrently taking on new clients and on sale now!

  14. PPE

    Tracked from PPE 06 10, 2020 22:29 Delete

    Profit from professional safety knee padscurrently taking on new clients and reasonably priced now!

  15. connected tv advertising

    Tracked from connected tv advertising 06 11, 2020 05:46 Delete

    Profit from professional check this currently open for service and reasonably priced now!

  16. publish your own roku channel

    Tracked from publish your own roku channel 06 13, 2020 09:36 Delete

    Profit from amazing run tv channel online currently taking on new clients in addition reasonably priced now!

  17. hazmat suppliers

    Tracked from hazmat suppliers 06 13, 2020 09:44 Delete

    Get here expert safety knee padscurrently open for service in addition reasonably priced now!

  18. surgical masks

    Tracked from surgical masks 06 15, 2020 00:33 Delete

    Get here expert 3-ply face maskscurrently taking on new clients in addition reasonably priced now!

  19. browse around these guys

    Tracked from browse around these guys 06 15, 2020 14:13 Delete

    Profit from professional roku channel development currently taking on new clients in addition on sale now!

  20. hazardous material suits

    Tracked from hazardous material suits 06 16, 2020 06:07 Delete

    Get here amazing hazmat supplierscurrently taking on new clients in addition reasonably priced now!

  21. how to start your own tv show

    Tracked from how to start your own tv show 06 18, 2020 05:07 Delete

    Get here professional streaming tv channels currently taking on new clients and reasonably priced now!

  22. dog wheelchair rear support

    Tracked from dog wheelchair rear support 07 4, 2020 21:14 Delete

    Get here professional Custom Built Dog Wheelchair currently taking on new clients in addition on sale now!

Leave a comment
[로그인][오픈아이디란?]
오픈아이디로만 댓글을 남길 수 있습니다


Recent Posts

  1. HDFS - Python Encoding 오류 처리
  2. HP - Vertica ROS Container 관련 오류...
  3. HDFS - Hive 실행시 System Time 오류
  4. HP - Vertica 사용자 쿼리 이력 테이블...
  5. Client에서 HDFS 환경의 데이터 처리시...

Recent Comments

  1. 안녕하세요^^ 배그핵
  2. 안녕하세요^^ 도움이 되셨다니, 저... sunshiny
  3. 정말 큰 도움이 되었습니다.. 감사합... 사랑은
  4. 네, 안녕하세요. 댓글 남겨 주셔서... sunshiny
  5. 감사합니다 많은 도움 되었습니다!ㅎㅎ 프리시퀸스

Recent Trackbacks

  1. phoenix seo phoenix seo %M
  2. animal mobility services animal mobility services %M
  3. face masks face masks %M
  4. healer healer 5 07
  5. small dog wheelchair small dog wheelchair 5 07

Calendar

«   07 2020   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

Bookmarks

  1. 위키피디아
  2. MysqlKorea
  3. 오라클 클럽
  4. API - Java
  5. Apache Hadoop API
  6. Apache Software Foundation
  7. HDFS 생태계 솔루션
  8. DNSBL - Spam Database Lookup
  9. Ready System
  10. Solaris Freeware
  11. Linux-Site
  12. 윈디하나의 솔라나라

Site Stats

TOTAL 3000425 HIT
TODAY 877 HIT
YESTERDAY 401 HIT