sun's longitude:36 41 01 
¡¤ ÀÚÀ¯°Ô½ÃÆÇ ¡¤ ¹¯°í´äÇϱ⠡¤ ¾ËÆĹ®¼­ ¡¤ RPMS list
¡¤ »ç¿ëÀÚ¹®¼­ ¡¤ ÆÁ/FAQ¸ðÀ½ ¡¤ ¸®´ª½ºLinks ¡¤ ÀÚ·á½Ç
¡¤ ¼­¹öÁ¤º¸ ¡¤ ¿î¿µÀÚ ¡¤ Books/FAQ ¡¤ FreeBSD
 
/board/read.php:¼Ò½ºº¸±â   
 
¾ËÆĹ®¼­
ÀÚÁÖ Àؾî¸Ô°Å³ª, ¸Þ¸ðÇØ µÑ Çʿ伺ÀÌ ÀÖ´Â ÆÁÀ̳ª ¹®¼­, ±âŸ µîµî
[*** ¾²±â ±ÝÁö´Ü¾î ÆÐÅÏ ***]
±Û º»¹® Áß°£¿¡ ¾÷·ÎµåÇÒ À̹ÌÁö¸¦ Ãß°¡ÇÏ´Â ¹æ¹ý : @@À̹ÌÁöÀ̸§@@
ex) @@foo.gif@@
140 ¹ø ±Û: [kernel] max open file and FD
±Û¾´ÀÌ: »êÀÌ [ȨÆäÀÌÁö] ±Û¾´³¯: 2006³â 01¿ù 01ÀÏ 03:38:50 ÀÏ(»õº®) Á¶È¸: 3576
[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"

 
ÀÌÀü±Û : [tip] ÁÖ¼®(#), °ø¹é ¶óÀÎÀ» Á¦¿ÜÇÏ°í Ãâ·ÂÇغ¸±â
´ÙÀ½±Û : make -- FD_SETSIZE  
 from 58.231.28.56
JS(Redhands)Board 0.4 +@

|±Û¾²±â| |´äÀå¾²±â| |¼öÁ¤| |»èÁ¦|
|ÀÌÀü±Û| |´ÙÀ½±Û| |¸ñ·Ïº¸±â|
Àμâ¿ë 

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

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