LINUXµ÷ÓÅ·½·¨×ܽá
LINUXµ÷ÓÅ·½·¨×ܽá
----------------------------------------------------------------------------------------------------------------------------
´ó¶àÊý Linux ·¢²¼°æ¶¼¶¨ÒåÁËÊʵ±µÄ»º³åÇøºÍÆäËû Transmission Control Protocol£¨TCP£©²ÎÊý¡£¿ÉÒÔÐÞ¸ÄÕâЩ²ÎÊýÀ´·ÖÅä¸ü¶àµÄÄڴ棬´Ó¶ø¸Ä½øÍøÂçÐÔÄÜ¡£ÉèÖÃÄں˲ÎÊýµÄ·½·¨ÊÇͨ¹ý proc ½Ó¿Ú£¬Ò²¾ÍÊÇͨ¹ý¶Áд /proc ÖеÄÖµ¡£ÐÒÔ˵ÄÊÇ£¬sysctl ¿ÉÒÔ¶ÁÈ¡ /etc/sysctl.conf ÖеÄÖµ²¢¸ù¾ÝÐèÒªÌî³ä /proc£¬ÕâÑù¾ÍÄܹ»¸üÇáËɵعÜÀíÕâЩ²ÎÊý¡£Çåµ¥ 2 չʾÔÚ»¥ÁªÍø·þÎñÆ÷ÉÏÓ¦ÓÃÓÚ Internet ·þÎñÆ÷µÄһЩ±È½Ï¼¤½øµÄÍøÂçÉèÖá£
# Use TCP syncookies when needed
net.ipv4.tcp_syncookies = 1
# Enable TCP window scaling
net.ipv4.tcp_window_scaling: = 1
# Increase TCP max buffer size
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
# Increase Linux autotuning TCP buffer limits
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
# Increase number of ports available
net.ipv4.ip_local_port_range = 1024 65000
½«ÕâЩÉèÖÃÌí¼Óµ½ /etc/sysctl.conf µÄÏÖÓÐÄÚÈÝÖС£µÚÒ»¸öÉèÖÃÆôÓà TCP SYN cookie¡£µ±´Ó¿Í»§»ú·¢À´Ð嵀 TCP Á¬½Óʱ£¬Êý¾Ý°üÉèÖÃÁË SYN 룬·þÎñÆ÷¾ÍΪÕâ¸ö°ë¿ªµÄÁ¬½Ó´´½¨Ò»¸öÌõÄ¿£¬²¢ÓÃÒ»¸ö SYN-ACK Êý¾Ý°ü½øÐÐÏìÓ¦¡£ÔÚÕý³£²Ù×÷ÖУ¬Ô¶³Ì¿Í»§»úÓÃÒ»¸ö ACK Êý¾Ý°ü½øÐÐÏìÓ¦£¬Õâ»áʹ°ë¿ªµÄÁ¬½Óת»»ÎªÈ«¿ªµÄ¡£ÓÐÒ»ÖÖ³ÆΪ SYN ·ºÀÄ£¨SYN flood£© µÄÍøÂç¹¥»÷£¬Ëüʹ ACK Êý¾Ý°üÎÞ·¨·µ»Ø£¬µ¼Ö·þÎñÆ÷ÓùâÄÚ´æ¿Õ¼ä£¬ÎÞ·¨´¦Àíµ½À´µÄÁ¬½Ó¡£SYN cookie ÌØÐÔ¿ÉÒÔʶ±ð³öÕâÖÖÇé¿ö£¬²¢Ê¹ÓÃÒ»ÖÖÓÅÑŵķ½·¨±£Áô¶ÓÁÐÖеĿռ䣨ϸ½Ú²Î¼û ²Î¿¼×ÊÁÏ Ò»½Ú£©¡£´ó¶àÊýϵͳ¶¼Ä¬ÈÏÆôÓÃÕâ¸öÌØÐÔ£¬µ«ÊÇÈ·±£ÅäÖÃÕâ¸öÌØÐÔ¸ü¿É¿¿¡£
ÆôÓà TCP ´°¿ÚÉìËõʹ¿Í»§»úÄܹ»ÒÔ¸ü¸ßµÄËÙ¶ÈÏÂÔØÊý¾Ý¡£TCP ÔÊÐíÔÚδ´ÓÔ¶³Ì¶ËÊÕµ½È·ÈϵÄÇé¿öÏ·¢ËͶà¸öÊý¾Ý°ü£¬Ä¬ÈÏÉèÖÃÊÇ×î¶à 64 KB£¬ÔÚÓëÑӳٱȽϴóµÄÔ¶³Ì¿Í»§»ú½øÐÐͨÐÅʱÕâ¸öÉèÖÿÉÄܲ»¹»¡£´°¿ÚÉìËõ»áÔÚÍ·ÖÐÆôÓøü¶àµÄ룬´Ó¶øÔö¼Ó´°¿Ú´óС¡£
ºóÃæËĸöÅäÖÃÏîÔö¼Ó TCP ·¢ËͺͽÓÊÕ»º³åÇø¡£ÕâʹӦÓóÌÐò¿ÉÒÔ¸ü¿ìµØ¶ªµôËüµÄÊý¾Ý£¬´Ó¶øΪÁíÒ»¸öÇëÇó·þÎñ¡£»¹¿ÉÒÔÇ¿»¯Ô¶³Ì¿Í»§»úÔÚ·þÎñÆ÷·±Ã¦Ê±·¢ËÍÊý¾ÝµÄÄÜÁ¦¡£
×îºóÒ»¸öÅäÖÃÏîÔö¼Ó¿ÉÓõı¾µØ¶Ë¿ÚÊýÁ¿£¬ÕâÑù¾ÍÔö¼ÓÁË¿ÉÒÔͬʱ·þÎñµÄ×î´óÁ¬½ÓÊýÁ¿¡£
ÔÚÏÂÒ»´ÎÒýµ¼ÏµÍ³Ê
Ïà¹ØÎĵµ£º
¾ßÌå²½ÖèÈçÏ£º
£¨Ò»£©´ò¿ªSource Insight£¬µ¥»÷¡¾ÏîÄ¿¡¿°´Å¥£¬µ¯³öÏÂÀ²Ëµ¥¡£
£¨¶þ£©µ¥»÷¡¾ÐÂÏîÄ¿¡¿°´Å¥£¬µ¯³ö¡¾ÐÂÏîÄ¿¡¿¶Ô»°¿ò£¬ÊäÈëÏîÄ¿ÃûºÍ´æ·Å·¾¶£¬µ¥»÷¡¾È·¶¨¡¿°´Å¥¡£Èçͼ1Ëùʾ¡£
ͼ1 ÐÂÏîÄ¿¶Ô»°¿ò
ÎÄÕÂÀ´Ô´£ºhttp://top-e.org/jiaoshi/html/539.html
£¨Èý£©µ¯³ö¡¾Ìí¼Óɾ³ýÎļþ¡¿¶Ô»°¿ò£¬ÔÚÄÚºËÔ´´ú ......
[------------------------------------------------------------------------]
[-- Uninformed Research -- informative information for the uninformed. --]
[------------------------------------------------------------------------]
[-- Genre : Development ......
ÕûÀíÁËһЩ³£ÓõÄLinuxÃüÁî
http://jythoner.javaeye.com/blog/290976
¹Ø¼ü×Ö: linux
1.²é¿´ÏµÍ³ÄÚºË
#uname -a
2.²é¿´cpuÐÅÏ¢
#cat /proc/cpuinfo
3.²é¿´ÄÚ´æʹÓÃÇé¿ö
#free -m
4.²é¿´Ó²ÅÌÊ£Óà¿Õ¼ä
#df -h
5.²é¿´Ä¿Â¼Õ¼Óÿռä
#du -hs Ŀ¼Ãû
6.²é¿´µ±Ç°ÓÐÄÄЩ½ø³Ì
#ps -A
7.²é¿´µ±Ç°½ø³ÌµÄʵ ......
¸Å¶øÑÔÖ®£¬virtio
ÊÇ°ëÐéÄ⻯ hypervisor ÖÐλÓÚÉ豸֮ÉϵijéÏó²ã¡£virtio
ÓÉ Rusty Russell ¿ª·¢£¬Ëûµ±Ê±µÄÄ¿µÄÊÇÖ§³Ö×Ô¼ºµÄÐéÄ⻯½â¾ö·½°¸ lguest
¡£±¾ÎÄÔÚ¿ªÆªÊ±½éÉÜ°ëÐéÄ⻯ºÍÄ£ÄâÉ豸£¬È»ºó̽Ë÷ virtio
µÄϸ½Ú¡£±¾ÎĵÄÖصãÊÇÀ´×Ô 2.6.30 Äں˷¢ÐаæµÄ virtio
¿ò¼Ü¡£
Linux ÊÇ hypervisor չ̨¡£ÈçÎÒµÄ ÆÊÎö ......
Ðí¶à¸Õ½Ó´¥LinuxµÄÍøÂç¹ÜÀíÔ±·¢ÏÖ£¬ËûÃǺÜÄÑÓÉÖ¸Ïòµã»÷ʽµÄ°²È«ÅäÖýçÃæת»»µ½ÁíÒ»ÖÖ»ùÓڱ༸´ÔÓ¶øÄÑÒÔ×½ÃþµÄÎı¾ÎļþµÄ½çÃæ¡£±¾ÎÄÁгöÆßÌõ¹ÜÀíÔ±Äܹ»Ò²Ó¦¸Ã¿ÉÒÔ×öµ½µÄ²½Ö裬´Ó¶ø°ïÖúËûÃǽ¨Á¢¸ü¼Ó°²È«µÄLinux·þÎñÆ÷£¬²¢ÏÔÖø½µµÍËûÃÇËùÃæÁٵķçÏÕ¡£
ÇëÈκδóÐÍ»ú¹¹µÄÍøÂç¹ÜÀíÔ±¶ÔLinuxºÍÍøÂç²Ù×÷ϵͳ£¨ÈçWindows NT»òNo ......