FrontPage|FindPage|TitleIndex|RecentChanges|RSS Server Limits
 

ServerLimits #


1 ServerLimits
1.1 /proc/sys/fs/file-max
1.2 ulimit
1.3 Processes and Threads
1.4 getrlimit(), setrlimit()

´ç¿¬È÷ ¿î¿µÃ¼Á¦´Â ´ç½ÅÀÇ ÇÁ·Î±×·¥ÀÌ Ç×»ó ¾öû³­ ½Ã½ºÅÛÀÚ¿øÀ» ¾µ°Å¶ó°í »ý°¢ÇÏÁö ¾Ê´Â´Ù. ±×·¡¼­ ´ëºÎºÐÀÇ °æ¿ì¿¡ Æò±ÕÀûÀÎ ÀÚ¿ø¸¸À» ¾µ ¼ö ÀÖµµ·Ï ÇÏ°í ÀÖ´Ù. ³ªÀÇ ½Ã½ºÅÛÀÌ Á¦°øÇØÁÖ´Â ÀÚ¿øÀ» È®ÀÎÇØ º¸ÀÚ.

1.1 /proc/sys/fs/file-max #


½Ã½ºÅÛ ÀüüÀûÀ¸·Î ¿­ ¼ö ÀÖ´Â ÆÄÀÏ °¹¼ö Á¦ÇÑ. ÇÊÀÚ ½Ã½ºÅÛÀº 12440 À¸·Î µÇ¾î ÀÖ´Ù. C10k ¹®Á¦ ÇØ°áÀ» À§ÇØ 32K°³ Á¤µµ·Î ³Ë³ËÇÏ°Ô Àâ¾Æº»´Ù.

#cat /proc/sys/fs/file-max
12440
#echo 32768 > /proc/sys/fs/file-max

1.2 ulimit #


ÇÁ·Î¼¼½º Çϳª°¡ ¿­ ¼ö ÀÖ´Â ÆÄÀÏ °¹¼ö Á¦ÇÑ.

#ulimit -n
1024
#ulimit -n 32768

1.3 Processes and Threads #


ÇÁ·Î¼¼½º °¹¼öÁ¦ÇÑ(Áï pidÀÇ max)°ú ¾²·¹µå °¹¼ö Á¦Çѵµ È®ÀÎÇØ º¸ÀÚ. ¾Æ·¡´Â ÇÊÀÚ ½Ã½ºÅÛ¿¡¼­ È®ÀÎÇØ º» °Í.

#cat /proc/sys/kernel/pid_max
32768
#cat /proc/sys/kernel/threads-max
4094

1.4 getrlimit(), setrlimit() #

#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>

int getrlimit(int resource, struct rlimit *rlim);
int getrusage(int who, struct rusage *usage);
int setrlimit(int resource, const struct rlimit *rlim);

struct rlimit {
    rlim_t rlim_cur;   /* Soft limit */
    rlim_t rlim_max;   /* Hard limit (ceiling for rlim_cur) */
};

º¸´Ù ÀÚ¼¼ÇÑ ³»¿ëÀº man setrlimit Çغ¼ °Í.

last modified 2004-06-10 18:21:52
EditText|FindPage|DeletePage|LikePages|