¼õÉÙLinuxÏÂSquid·þÎñÆ÷µÄTIME_WAITÌ×½Ó×ÖÊýÁ¿
Linuxϸ߲¢·¢µÄSquid·þÎñÆ÷£¬TCP TIME_WAITÌ×½Ó×ÖÊýÁ¿¾³£´ïµ½Á½¡¢ÈýÍò£¬·þÎñÆ÷ºÜÈÝÒ×±»ÍÏËÀ¡£Í¨¹ýÐÞ¸ÄLinuxÄں˲ÎÊý£¬¿ÉÒÔ¼õÉÙSquid·þÎñÆ÷µÄTIME_WAITÌ×½Ó×ÖÊýÁ¿¡£
¡¡¡¡
vi /etc/sysctl.conf
¡¡¡¡Ôö¼ÓÒÔϼ¸ÐУº
ÒýÓÃ
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 5000
¡¡¡¡ËµÃ÷£º
¡¡¡¡net.ipv4.tcp_syncookies = 1 ±íʾ¿ªÆôSYN Cookies¡£µ±³öÏÖSYNµÈ´ý¶ÓÁÐÒç³öʱ£¬ÆôÓÃcookiesÀ´´¦Àí£¬¿É·À·¶ÉÙÁ¿SYN¹¥»÷£¬Ä¬ÈÏΪ0£¬±íʾ¹Ø±Õ£»
¡¡¡¡net.ipv4.tcp_tw_reuse = 1 ±íʾ¿ªÆôÖØÓá£ÔÊÐí½«TIME-WAIT socketsÖØÐÂÓÃÓÚеÄTCPÁ¬½Ó£¬Ä¬ÈÏΪ0£¬±íʾ¹Ø±Õ£»
¡¡¡¡net.ipv4.tcp_tw_recycle = 1 ±íʾ¿ªÆôTCPÁ¬½ÓÖÐTIME-WAIT socketsµÄ¿ìËÙ»ØÊÕ£¬Ä¬ÈÏΪ0£¬±íʾ¹Ø±Õ¡£
¡¡¡¡net.ipv4.tcp_fin_timeout = 30 ±íʾÈç¹ûÌ×½Ó×ÖÓɱ¾¶ËÒªÇó¹Ø±Õ£¬Õâ¸ö²ÎÊý¾ö¶¨ÁËËü±£³ÖÔÚFIN-WAIT-2״̬µÄʱ¼ä¡£
¡¡¡¡net.ipv4.tcp_keepalive_time = 1200 ±íʾµ±keepaliveÆðÓõÄʱºò£¬TCP·¢ËÍkeepaliveÏûÏ¢µÄƵ¶È¡£È±Ê¡ÊÇ2Сʱ£¬¸ÄΪ20·ÖÖÓ¡£
¡¡¡¡net.ipv4.ip_local_port_range = 1024 65000 ±íʾÓÃÓÚÏòÍâÁ¬½ÓµÄ¶Ë¿Ú·¶Î§¡£È±Ê¡Çé¿öϺÜС£º32768µ½61000£¬¸ÄΪ1024µ½65000¡£
¡¡¡¡net.ipv4.tcp_max_syn_backlog = 8192 ±íʾSYN¶ÓÁеij¤¶È£¬Ä¬ÈÏΪ1024£¬¼Ó´ó¶ÓÁ㤶ÈΪ8192£¬¿ÉÒÔÈÝÄɸü¶àµÈ´ýÁ¬½ÓµÄÍøÂçÁ¬½ÓÊý¡£
¡¡¡¡net.ipv4.tcp_max_tw_buckets = 5000 ±íʾϵͳͬʱ±£³ÖTIME_WAITÌ×½Ó×ÖµÄ×î´óÊýÁ¿£¬Èç¹û³¬¹ýÕâ¸öÊý×Ö£¬TIME_WAITÌ×½Ó×Ö½«Á¢¿Ì±»Çå³ý²¢´òÓ¡¾¯¸æÐÅÏ¢¡£Ä¬ÈÏΪ180000£¬¸ÄΪ5000¡£¶ÔÓÚApache¡¢NginxµÈ·þÎñÆ÷£¬Éϼ¸ÐеIJÎÊý¿ÉÒԺܺõؼõÉÙTIME_WAITÌ×½Ó×ÖÊýÁ¿£¬µ«ÊǶÔÓÚSquid£¬Ð§¹ûÈ´²»´ó¡£´ËÏî²ÎÊý¿ÉÒÔ¿ØÖÆTIME_WAITÌ×½Ó×ÖµÄ×î´óÊýÁ¿£¬±ÜÃâSquid·þÎñÆ÷±»´óÁ¿µÄTIME_WAITÌ×½Ó×ÖÍÏËÀ¡£
¡¡¡¡Ö´ÐÐÒÔÏÂÃüÁîʹÅäÖÃÉúЧ£º
/sbin/sysctl -p
Ïà¹ØÎĵµ£º
1 ¡¢ÖØÐÂÆô¶¯»úÆ÷£¬ÔÚ³öÏÖgrubÒýµ¼½çÃæºó£¬°´F2£¬ÔÚÆô¶¯linux µÄÑ¡ÏîÀï¼ÓÉÏinit=/bin/bash£¬Í¨¹ý¸øÄں˴«µÝinit=/bin/bash²ÎÊýʹµÃOSÔÚÔËÐÐlogin³ÌÐò֮ǰÔËÐÐbash£¬³öÏÖÃüÁîÐС£
¡¡¡¡2 ¡¢ÉÔµÈƬ¿Ì³öÏÖ(none)# £ºÃüÁîÐС£
¡¡¡¡3 ¡¢ÊäÈëmount -n / -o remount £¬rw
¡¡¡¡4 ¡¢ÊäÈë mount–n /usr
¡¡¡¡5 ¡¢ÊäÈë cd /usr ......
ÔÚ linux ÏÂÅäÖÃ ITK
1. ÏÂÔØ CMake£ºhttp://www.cmake.org/cmake/resources/software.html
Ϊ·½±ã°²×°£¬ÕâÀïÏÂÔضþ½øÖÆÎļþ£¬Ñ¡ÔñÏÂÔØ£º cmake-2.6.4-Linux-i386.sh
2. °²×° CMake, µ½ cmake-2.6.4-Linux-i386.sh ´æ·ÅµÄĿ¼,ÊäÈ룬¿ÉÓà TAB ¼ü·½±ã²¹ÆëÃüÁî
#./ cmake-2. ......
0/viµÄʹÓÃ:
Ctrl + f ÆÁÄ»ÏòÇ°·¶¯Ò»Ò³£¨³£Óã©
Ctrl + b ÆÁÄ»Ïòºó·¶¯Ò»Ò³£¨³£Óã©
Ctrl + d ÆÁÄ»ÏòÇ°·¶¯°ëÒ³
Ctrl + u ÆÁÄ»Ïòºó·¶¯°ëÒ³
n<space> °´ÏÂÊý×ÖºóÔÙ°´¿Õ¸ñ¼ü£¬¹â±ê»áÏòÓÒÒƶ¯ÕâÒ»ÐеÄn¸ö×Ö·û¡£ÀýÈç:20<space>,Ôò¹â±ê»áÏòÓÒÒƶ¯20¸ö×Ö·û
0 &nbs ......
¼¶±ð£º ³õ¼¶
Ñî ¾ (cdlyangj@cn.ibm.com), Èí¼þ¹¤³Ìʦ, IBM
2008 Äê 11 ÔÂ 27 ÈÕ
ÈçºÎ¶¨Î»Ó¦ÓóÌÐò¿ª·¢ÖеÄÄÚ´æÎÊÌ⣬һֱÊÇ inux Ó¦ÓóÌÐò¿ª·¢ÖеÄÆ¿¾±ËùÔÚ¡£ÓÐÒ»¿î·Ç³£ÓÅÐãµÄ linux Ï¿ªÔ´µÄÄÚ´æÎÊÌâ¼ì²â¹¤¾ß£ºvalgrind£¬Äܹ»¼«´óµÄ°ïÖúÄã½â¾öÉÏÊöÎÊÌâ¡£ÕÆÎÕ valgrind µÄʹÓÃÒÔ¼°¹ ......