×ðÁú¿­Ê±¹ÙÍøµÇ¼

ÔõÑùʹÓÃLinux¾ÙÐÐÍøÂç´ø¿íÓÅ»¯

ÔõÑùʹÓÃlinux¾ÙÐÐÍøÂç´ø¿íÓÅ»¯

ÍøÂç´ø¿íµÄÓÅ»¯ÊÇÌá¸ßÍøÂç´«ÊäËÙÂʺÍÖÊÁ¿µÄÒªº¦¡£ÔÚLinuxϵͳÖÐ £¬ÓÐÐí¶àÒªÁì¿ÉÒÔ×ÊÖúÎÒÃÇÓÅ»¯ÍøÂç´ø¿í £¬±¾ÎĽ«ÏÈÈÝһЩ³£ÓõÄÒªÁì £¬²¢¸½ÉÏÏìÓ¦µÄ´úÂëʾÀý¡£

µ÷½âÄں˲ÎÊý

µ÷½âLinuxÄں˲ÎÊý¿ÉÒÔ¸ÄÉÆÍøÂçÐÔÄÜ¡£ÒÔÏÂÊÇһЩ³£ÓõIJÎÊýºÍʾÀý´úÂ룺

a) ÐÞ¸ÄTCP´°¿Ú¾Þϸ

TCP´°¿Ú¾Þϸ¾öÒéÁË·¢ËͺÍÎüÊÕÊý¾ÝµÄËÙÂÊ¡£Í¨¹ýÔöÌíTCP´°¿Ú¾Þϸ £¬¿ÉÒÔ¼ÓËÙÍøÂç´«ÊäËÙÂÊ¡£

·­¿ªÖÕ¶Ë £¬ÊäÈëÒÔÏÂÏÂÁ

sudo sysctl -w net.ipv4.tcp_window_scaling=1
sudo sysctl -w net.ipv4.tcp_rmem='4096 87380 4194304'
sudo sysctl -w net.ipv4.tcp_wmem='4096 87380 4194304'

µÇ¼ºó¸´ÖÆ

b) ¿ªÆôTCP¿ìËÙ·­¿ª

TCP¿ìËÙ·­¿ª¿ÉÒÔ¼ÓËÙ½¨ÉèTCPÅþÁ¬µÄËÙÂÊ¡£ÊäÈëÒÔÏÂÏÂÁ

sudo sysctl -w net.ipv4.tcp_fastopen=3

µÇ¼ºó¸´ÖÆ

c) ¿ªÆôÓµÈû¿ØÖÆËã·¨

LinuxÖ§³Ö¶àÖÖTCPÓµÈû¿ØÖÆËã·¨ £¬Æ¾Ö¤²î±ðÍøÂçÇéÐÎÑ¡ÔñÊʺϵÄËã·¨¿ÉÒÔÌá¸ßÍøÂçÍÌÍÂÁ¿¡£

ÊäÈëÒÔÏÂÏÂÁî £¬Éó²éÄ¿½ñÓµÈû¿ØÖÆËã·¨£º

cat /proc/sys/net/ipv4/tcp_congestion_control

µÇ¼ºó¸´ÖÆ

ÊäÈëÒÔÏÂÏÂÁî £¬Çл»µ½BBRËã·¨£º

sudo sysctl -w net.ipv4.tcp_congestion_control=bbr

µÇ¼ºó¸´ÖÆ

ÓÅ»¯ÍøÂçÐÐÁÐ

LinuxϵͳʹÓÃÐÐÁÐÀ´´¦ÀíÍøÂçÊý¾Ý°ü¡£Í¨¹ýµ÷½âÐÐÁеľÞϸºÍ´¦Àí·½·¨ £¬¿ÉÒÔïÔÌ­ÍøÂçÑӳٺͶª°ü¡£ÒÔÏÂÊÇһЩʾÀý´úÂ룺

·­¿ªÖÕ¶Ë £¬ÊäÈëÒÔÏÂÏÂÁî £¬Éó²éÄ¿½ñÐÐÁг¤¶È£º

sudo sysctl -q net.core.netdev_max_backlog

µÇ¼ºó¸´ÖÆ

ÊäÈëÒÔÏÂÏÂÁî £¬½«ÐÐÁ㤶ÈÔöÌíµ½×î´óÖµ£º

sudo sysctl -w net.core.netdev_max_backlog=100000

µÇ¼ºó¸´ÖÆ

ʹÓÃÍøÂç¼ÓËÙ¹¤¾ß

ÍøÂç¼ÓËÙ¹¤¾ß¿ÉÒÔͨ¹ýÓÅ»¯´«ÊäЭæźÍѹËõÊý¾ÝÀ´Ìá¸ßÍøÂç´ø¿í¡£ÏÂÃæÊÇÁ½¸ö³£ÓõÄÍøÂç¼ÓËÙ¹¤¾ß£º

a) Wondershaper

WondershaperÊÇÒ»¿îLinuxÍøÂç´ø¿íÖÎÀí¹¤¾ß £¬¿ÉÒÔÏÞÖÆ´ø¿íºÍÓÅ»¯ÍøÂçÐÔÄÜ¡£ÒÔÏÂÊÇʾÀý´úÂ룺

sudo apt-get install wondershaper
sudo wondershaper eth0 1000 100

µÇ¼ºó¸´ÖÆ

ÒÔÉÏ´úÂ뽫ÏÞÖÆeth0½Ó¿ÚµÄÏÂÔØËÙÂÊΪ1000 Kbps £¬ÉÏ´«ËÙÂÊΪ100 Kbps¡£

b) TC£¨Traffic Control£©

TCÊÇLinuxϵͳ×Ô´øµÄÒ»¸öÍøÂçÁ÷Á¿¿ØÖƹ¤¾ß £¬¿ÉÒÔͨ¹ýÉèÖòî±ðµÄ¹ýÂËÆ÷ºÍ¹æÔòÀ´ÓÅ»¯ÍøÂçÐÔÄÜ¡£ÒÔÏÂÊÇʾÀý´úÂ룺

sudo tc qdisc add dev eth0 root tbf rate 100mbit burst 32kbit latency 400ms

µÇ¼ºó¸´ÖÆ

ÒÔÉÏ´úÂ뽫ÉèÖÃeth0½Ó¿ÚµÄ´ø¿íΪ100 Mbps £¬Í»·¢ËÙÂÊΪ32 Kbps £¬ÑÓ³ÙΪ400 ms¡£

×ܽ᣺

ÔÚLinuxϵͳÖÐ £¬Í¨¹ýµ÷½âÄں˲ÎÊý¡¢ÓÅ»¯ÍøÂçÐÐÁкÍʹÓÃÍøÂç¼ÓËÙ¹¤¾ß £¬ÎÒÃÇ¿ÉÒÔÓÐÓÃÌá¸ßÍøÂç´ø¿íµÄÐÔÄÜ¡£ÉÏÊöÒªÁì½öÌṩÁËһЩ³£ÓõÄʾÀý´úÂë £¬Æ¾Ö¤ÏÖÕæÏàÐÎ £¬Äú¿ÉÄÜÐèҪƾ֤×Ô¼ºµÄÐèÇó¾ÙÐÐÊʵ±µ÷½âºÍÉèÖá£×£ÄúÔÚʹÓÃLinux¾ÙÐÐÍøÂç´ø¿íÓÅ»¯·½ÃæÓÐËùÊÕ»ñ£¡

ÒÔÉϾÍÊÇÔõÑùʹÓÃLinux¾ÙÐÐÍøÂç´ø¿íÓÅ»¯µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ