Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linuxÏÂfile descriptoerÏÞÖÆ


linuxÏÂfile descriptoerÏÞÖÆ
ĬÈÏ·ÖÀà   2009-11-21 14:47   ÔĶÁ0   ÆÀÂÛ0  
×ֺţº ´ó´ó  ÖÐÖР СС
Tuning file descriptor limits on Linux
Linux limits the number of file descriptors that any one process may open; the default limits are 1024 per process. These limits can prevent optimum performance of both benchmarking clients (such as httperf and apachebench) and of the web servers themselves (Apache is not affected, since it uses a process per connection, but single process web servers such as Zeus use a file descriptor per connection, and so can easily fall foul of the default limit).
The open file limit is one of the limits that can be tuned with the ulimit command. The command
ulimit -aS
displays the current limit, and
ulimit -aH
displays the hard limit (above which the limit cannot be increased without tuning kernel parameters in /proc).
The following is an example of the output of
ulimit -aH
. You can see that the current shell (and its children) is restricted to 1024 open file descriptors.
core file size (blocks) unlimiteddata seg size (kbytes) unlimitedfile size (blocks) unlimitedmax locked memory (kbytes) unlimitedmax memory size (kbytes) unlimitedopen files 1024pipe size (512 bytes) 8stack size (kbytes) unlimitedcpu time (seconds) unlimitedmax user processes 4094virtual memory (kbytes) unlimited
Increasing the file descriptor limit
The file descriptor limit can be increased using the following procedure:
 
Edit
/etc/security/limits.conf
and add the lines:
* soft nofile 1024
* hard nofile 65535
 
Edit
/etc/pam.d/login
, adding the line:
session required /lib/security/pam_limits.so
 
The system file descriptor limit is set in
/proc/sys/fs/file-max
. The following command will increase the limit to 65535:
echo 65535 > /proc/sys/fs/file-max
 
You should then be able to increase the file descriptor limits using:
ulimit -n unlimitedThe above


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì(Áù) L2CAP±à³ÌʵÀý

ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
 Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......

ʵսLinux Bluetooth±à³Ì (Æß) SDPЭÒé

Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖЭÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀЭÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......

yumÊÇʲô?(linuxÃüÁî)

 
yumÊÇʲô?(linuxÃüÁî)
Ò». yumÊÇʲô
yum = Yellow dog Updater, Modified
Ö÷Òª¹¦ÄÜÊǸü·½±ãµÄÌí¼Ó/ɾ³ý/¸üÐÂRPM°ü.
ËüÄÜ×Ô¶¯½â¾ö°üµÄÒÐÀµÐÔÎÊÌâ.
ËüÄܱãÓÚ¹ÜÀí´óÁ¿ÏµÍ³µÄ¸üÐÂÎÊÌâ
×¢:ΪʲôҪʹÓÃyum¶ø²»ÓÃapt,×î¼òµ¥µÄÔ­Òò,Fedora×Ô´ø
¶þ. yumÌØµã
*¿ÉÒÔͬʱÅäÖöà¸ö×ÊÔ´¿â(Repository)
*¼ò½àµÄÅäÖÃÎļ ......

Linux µÄÎļþϵͳ

Linux Ê×ÏÈ´´½¨ramfsÎļþϵͳ(/)
È»ºó°Ñinitrd.imgÎļþ¼ÓÔØµ½ / Ŀ¼Ï¡£
ÆäËüÎļþϵͳÊÇ×öΪramfsµÄÒ»¸öĿ¼½áµã¹ÒÔØÉÏÈ¥µÄ¡£
initrd.imgÊÇÒ»¸öÓÃzipѹËõµÄcpio¸ñʽµÄѹËõÎļþ¡£°´ÏÂÃæ²½ÖèʵÏÖ½âѹ
µÚÒ»²½£º½«initrd.img¸ÄÃûΪinitrd.img.gz
mv initrd.img initrd.img.gz
µÚ¶þ²½£ºÓÃgunzip½âѹÉú³Éinitrd.img
gunzi ......

linuxÐÞ¸Ä×Ö·û¼¯

 ¿ÉÒÔͨ¹ýÏÂÃæÃüÁî²é¿´µ±Ç°±àÂ뷽ʽ£º  
  h@debian-server:~/$   locale   -a  
  C  
  en_US  
  en_US.iso88591  
  en_US.iso885915  
  en_US.utf8  
  POSIX  
  zh_CN  
  zh_CN.gb1 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ