Menu

Linux Socket 개수 조정

2016. 1. 29. 14:56

냥쿤이 Linux

우분투 시스템 자원 환경을 체크


명령어 :

ulimit -Sa    :: 소프트 웨어 보기

ulimit -Ha    :: 하드 웨어 보기



open file 의 개수 를 조정한다

( 리눅스는 소캣도 파일로 간주한다 )

에디터에서 아래의 limits.conf 파일에 값을 추가 시켜준다


/etc/security/limits.conf



*       soft    nproc   unlimited

*       hard    nproc   unlimited

*       soft    nofile  4096

*       hard    nofile  8192


위와같이 한 후


vi /usr/include/x86_64-linux-gnu/bits/typesizes.h



#define __FD_SETSIZE        1024     디폴트로 잡혀있는 값을


#define __FD_SETSIZE        4096    내가 셋팅한 값으로 바꿔준다