sun's longitude:46 52 06 
¡¤ ÀÚÀ¯°Ô½ÃÆÇ ¡¤ ¹¯°í´äÇϱ⠡¤ ¾ËÆĹ®¼­ ¡¤ RPMS list
¡¤ »ç¿ëÀÚ¹®¼­ ¡¤ ÆÁ/FAQ¸ðÀ½ ¡¤ ¸®´ª½ºLinks ¡¤ ÀÚ·á½Ç
¡¤ ¼­¹öÁ¤º¸ ¡¤ ¿î¿µÀÚ ¡¤ Books/FAQ ¡¤ FreeBSD
 
/board/delete.php:¼Ò½ºº¸±â   
 
¾ËÆĹ®¼­
ÀÚÁÖ Àؾî¸Ô°Å³ª, ¸Þ¸ðÇØ µÑ Çʿ伺ÀÌ ÀÖ´Â ÆÁÀ̳ª ¹®¼­, ±âŸ µîµî
[*** ¾²±â ±ÝÁö´Ü¾î ÆÐÅÏ ***]
±Û º»¹® Áß°£¿¡ ¾÷·ÎµåÇÒ À̹ÌÁö¸¦ Ãß°¡ÇÏ´Â ¹æ¹ý : @@À̹ÌÁöÀ̸§@@
ex) @@foo.gif@@
 ¡Ú ±Û Áö¿ì±â Ç׸ñÀÔ´Ï´Ù. Çѹø ´õ »ý°¢ÇÏ½Ã°í °áÁ¤ÇϽʽÿÀ.!!!
Á¦¸ñ 140 : [kernel] max open file and FD
 À̸§  »êÀÌ [Ȩ]http://linuxchannel.net/
[max open file and file descriptor]

-- san2@2005.10.28

process limits <= user limits <= kernel limits


1. process limits

linux-2.4.x/include/linux/limits.h
{
NR_OPEN // max open files per a process
OPEN_MAX // max open FD number per a process, refer FD_SETSIZE
}

/usr/include/bits/types.h or /usr/include/bits/typesizes.h
{
__FD_SETSIZE
}


2. user limits

linux-2.4.x/include/linux/fs.h
{
INR_OPEN // max open files per a user, same as `ulimit -n'
}

ulimit
{
ulimit -n // max open files, same as INR_OPEN
ulimit -u // refer NR_OPEN
}


3. kernel limits

linux-2.4.x/include/linux/fs.h
{
NR_FILE // max open files at same time
}

/proc/sys/fs/file-max
{
file-max // max open files
}


4. tuning

1) /proc/sys/fs/file-max or fs.file-max in /etc/sysctl.conf file

- file-max: phycical memory(KB) / 8KB
- file-max: physical memory(KB) * 10% (recommand)
- fs.file-max setting
512M => 65536
1G => 102400
2G => 204800
4G => 409600

2) The size of `fd_set' becomes about 8KB of memory.

3) if `process limits == user limits', then

FD=16384




4) compile application

bash: export CPPFLAGS="-DFD_SETSIZE=16384"
csh: setenv CPPFLAGS "-DFD_SETSIZE=16384"
2006³â 01¿ù 01ÀÏ 03:38:50 ÀÏ(»õº®)  from 58.231.28.56
0
¾ÏÈ£: °ø¿ë º¸¾È SSL ¼­¹ö°¡ ÁغñµÇ±â Àü±îÁö´Â off ÇÕ´Ï´Ù

apache lighttpd linuxchannel.net 
Copyright 1997-2024. linuxchannel.net. All rights reserved.

Page loading: 0.02(server) + (network) + (browser) seconds