Background Image
조회 수 26630 추천 수 0 댓글 1
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

DB를 운영하다 보면, 가끔 disk full(여유공간 부족) 상태가 되거나, 여러가지 이유(연계프로그램 버그, 소스 버그 등) 으로 너무나 많은 file open 이 되어 CUBRID 운영이 곤란할 경우가 발생할 수 있습니다.

위와같이 서버의 리소스를 특정 프로그램 혹은 유저가 점유할 수 있다면, 서버가 이를 버티지 못하고 다운되는 결과를 가져올 수 있습니다.

이러한 경우, 간단히 파일 설정값을 변경하여 리소스를 제한하여 서버다운을 예방할 수 있습니다.

방법은 의외로 간단합니다.
/etc/security/limit.conf파일을 수정하면 됩니다.

아래는 limit.conf파일의 내용입니다.

# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - an user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#        - the wildcard %, can be also used with %group syntax,
#                 for maxlogin limit
#<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
# End of file



적용방법은 아래와 같습니다.
       <domain> <type> <item> <value>로 추가 입력해주면 됩니다.

상세설명은 아래와 같습니다.
  • domain : 제한할 대상작성 (*, user명, 그룹명을 줄 수 있다.(그룹에 적용할 경우 @가 붙는다))
  • type : 강하게 제한할 것인지, 어느정도 여유를 줄 것인지를 결정한다.
    • soft : soft로 설정한 용량을 넘어가면 '경고' 메시지를 남깁니다..
    • hard : 어떠한 일이 있어도 hard를 넘을 수 없다는 의미이다.
  • item : 제한할 항목으로 core, data seg, file size등 여러가지가 존재.
    • nproc : 최대 프로세스의 갯수(KB)
    • stack : 최대 스택 사이즈(KB)
    • nofile : 한번에 열 수 있는 최대 파일 수
    • core : core파일의 사이즈(KB)
  • value : 제한 하고자 하는 설정값


예제

--> 아래는 예제일뿐, 관리하시는 DB서버에 스펙에 따라 value를 적절히 조정하셔야 합니다.

cubrid hard nproc 83728
cubrid soft nproc 83728
cubrid soft stack 10240
cubrid soft nofile 55536
cubrid hard nofile 55536
cubrid soft core 102400000


위 설정을 관리하는 서버에 적절히 이용하시면 효과적인 서버 관리를 할 수 있겠습니다.

현재 서버에서 제한사항 보기

[root@os1 ~]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 8191
max locked memory       (kbytes, -l) 32
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) 8191
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

감사합니다.

  • ?
    엄기호 2016.02.24 19:50

    limit.conf 파일 내용에 "cubrid soft nproc 83728"  설정하였더라도 가끔 스레드가 부족하여
    서비스 구동이 안되는 현상이 발생 할 수 있습니다.

    "cubrid soft nproc 83728" --> 최대치는 65535입니다. 그러나 메모리가 많은 경우는 그 이상으로 설정하기도 합니다.
    그래서 "* soft nproc unlimit" 설정하기도 하고, "* soft nproc 65535"로 설정을 합니다.

    "cubrid soft nproc 83728"을 주석 처리하고, limits.d/90-nproc.conf파일 내용을 수정 해야합니다.
    * soft nproc 1024  --> * soft nproc 65535


  1. 멀티미디어 데이터 관리를 위한 CUBRID GLO Method 활용

    Date2009.12.11 Category기타 Byjanus Views16191
    Read More
  2. QTADO를 이용하여 CUBRID접속하기

    Date2009.12.10 CategoryODBC/OLEDB Bycubebridge Views21489
    Read More
  3. CUBRID 개발 가이드

    Date2009.12.09 Category기타 Byjanus Views18368
    Read More
  4. 서비스 오픈을 위한 CUBRID 구성 가이드

    Date2009.11.28 Category기타 By손승일 Views23204
    Read More
  5. CUBRID R2.0 ISV(Independent Software Vendor)설치방법

    Date2009.11.20 CategoryInstall Bycubebridge Views27922
    Read More
  6. CUBRID 2008 R2.0의 CM변경사항

    Date2009.11.20 Category기타 Byjanus Views17045
    Read More
  7. CUBRID Java Stored Procedure와 DB Server Memory 관계

    Date2009.10.31 CategoryJava By손승일 Views40190
    Read More
  8. QuantumDB Eclipse Plugin을 사용하여 CUBRID연동하기

    Date2009.10.06 CategoryJava Bycubebridge Views28922
    Read More
  9. windows 환경에서 여러버젼의 CUBRID 설치하여 사용하기

    Date2009.09.16 CategoryWindows By남재우 Views26191
    Read More
  10. CUBRID HA introduction

    Date2009.08.28 Category기타 Byjanus Views20863
    Read More
  11. CUBRID2008 R2.0 실행계획 분석하기

    Date2009.08.27 Category기타 Bycubebridge Views21917
    Read More
  12. CUBRID 2008 + XE 설치 가이드 [R2.0]

    Date2009.08.27 Category기타 ByPrototype Views16573
    Read More
  13. CUBRID 설치 및 매니저 구동하기(CUBRID 2008 R2.0)

    Date2009.08.18 CategoryInstall ByCUBRID_DEV Views30053
    Read More
  14. DB의 스키마와 데이터를 파일로 내려받기

    Date2009.08.17 Category기타 Byseongjoon Views20009
    Read More
  15. CUBRID 주요 명령 요약 정리

    Date2009.08.17 Category기타 By정만영 Views17187
    Read More
  16. CUBRID Manager login 안내

    Date2009.08.17 Category기타 Byseongjoon Views16201
    Read More
  17. CUBRID2008_보안설정[R2.0]

    Date2009.08.17 Category기타 Byseongjoon Views16272
    Read More
  18. CUBRID2008R1.x to 2.0 마이그레이션 가이드 (32bit 기준)

    Date2009.08.17 CategoryLinux By정만영 Views27205
    Read More
  19. CUBRID Tutorial (Unix/Linux)

    Date2009.08.17 CategoryLinux By정만영 Views27887
    Read More
  20. CUBRID2008R2.0 Windows BACKUP 자동화 설정하기

    Date2009.08.17 CategoryWindows By정만영 Views27942
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 Next
/ 9

Contact Cubrid

대표전화 070-4077-2110 / 기술문의 070-4077-2113 / 영업문의 070-4077-2112 / Email. contact_at_cubrid.com
Contact Sales