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

ÔõÑùÔÚ÷è÷ë²Ù×÷ϵͳÉϾÙÐÐϵͳµÄ¸ß¼¶µ÷ÓźÍÉèÖà £¿

ÔõÑùÔÚ÷è÷ë²Ù×÷ϵͳÉϾÙÐÐϵͳµÄ¸ß¼¶µ÷ÓźÍÉèÖà £¿

СÐò£º

÷è÷ë²Ù×÷ϵͳÊÇÒ»¿î»ùÓÚLinuxµÄ²Ù×÷ϵͳ £¬¾ßÓи߶ȵÄÎȹÌÐÔºÍÇå¾²ÐÔ £¬ÆÕ±éÓ¦ÓÃÓÚЧÀÍÆ÷ºÍСÎÒ˽È˵çÄÔ¡£È»¶ø £¬ÎªÁË»ñµÃ¸üºÃµÄÐÔÄܺÍ˳ӦÌض¨µÄÐèÇó £¬ÎÒÃÇÐèÒª¾ÙÐи߼¶µ÷ÓźÍÉèÖᣱ¾ÎĽ«ÏÈÈÝÔõÑùÔÚ÷è÷ë²Ù×÷ϵͳÉϾÙÐÐϵͳµÄ¸ß¼¶µ÷ÓźÍÉèÖà £¬°üÀ¨Äں˲ÎÊýÓÅ»¯¡¢ÎļþϵͳÉèÖá¢IOµ÷Àí·½·¨¡¢Àú³ÌÓÅÏȼ¶¡¢ÄÚ´æÖÎÀíµÈ·½Ãæ £¬²¢ÌṩÏìÓ¦µÄ´úÂëʾÀý¡£

Ò»¡¢Äں˲ÎÊýÓÅ»¯

÷è÷ë²Ù×÷ϵͳµÄÐÔÄܺÍÎȹÌÐÔ¶¼ÓëÄں˲ÎÊýµÄÉèÖÃϢϢÏà¹Ø¡ £¿ÉÒÔͨ¹ýÐÞ¸Ä/sys»ò/procĿ¼ÏµÄÎļþÀ´¸ü¸ÄÄں˲ÎÊý¡£ÏÂÃæÊÇһЩ³£¼ûµÄÄں˲ÎÊýÉèÖõÄʾÀý´úÂ룺

£¨1£©µ÷½âTCP/IPÏà¹Ø²ÎÊý£º

sysctl -w net.core.somaxconn=65535

sysctl -w net.ipv4.tcp_max_syn_backlog=65535

sysctl -w net.ipv4.tcp_max_tw_buckets=65535

£¨2£©µ÷½âÎļþÐÎò·ûÏÞÖÆ£º

sysctl -w fs.file-max=65535

ulimit -n 65535

£¨3£©µ÷½âÄÚ´æ·ÖÅÉ»úÖÆ£º

sysctl -w vm.swappiness=10

sysctl -w vm.dirty_ratio=5

sysctl -w vm.dirty_background_ratio=3

¶þ¡¢ÎļþϵͳÉèÖÃ

ÎļþϵͳµÄÑ¡ÔñºÍÓÅ»¯¶ÔϵͳµÄÐÔÄÜÒ²ÓÐ×ÅÖ÷ÒªµÄÓ°Ïì¡£ÔÚ÷è÷ë²Ù×÷ϵͳÖÐ £¬Ä¬ÈÏʹÓõÄÊÇext4Îļþϵͳ¡£ÏÂÃæÊÇһЩÎļþϵͳÉèÖõÄʾÀý´úÂ룺

£¨1£©ÆôÓÃдÈ뻺´æ£º

tune2fs -o journal_data_writeback /dev/sda1

£¨2£©µ÷½â×î´ó·­¿ªÎļþÊý£º

echo “* – nofile 65535” >> /etc/security/limits.conf

Èý¡¢IOµ÷Àí·½·¨

IOµ÷Àí·½·¨ÊÇÖ¸¶Ô´ÅÅÌIOÇëÇóµÄµ÷Àí·½·¨µÄÑ¡Ôñ £¬²î±ðµÄµ÷Àí·½·¨ÊÊÓÃÓÚ²î±ðµÄ³¡¾°¡£ÔÚ÷è÷ë²Ù×÷ϵͳÖÐ £¬Ä¬ÈÏʹÓõÄÊÇdeadlineµ÷Àí·½·¨¡£ÏÂÃæÊÇһЩIOµ÷Àí·½·¨ÉèÖõÄʾÀý´úÂ룺

£¨1£©¸ü¸Äµ÷Àí·½·¨£º

echo “deadline” > /sys/block/sda/queue/scheduler

£¨2£©É趨¶Áд±ÈÀý£º

echo “512” > /sys/block/sda/queue/iosched/writes_starved

ËÄ¡¢Àú³ÌÓÅÏȼ¶

¹ØÓÚÐèÒªÓÅÏÈ´¦ÀíµÄÀú³Ì £¬¿ÉÒÔͨ¹ýµ÷½âÀú³ÌµÄÓÅÏȼ¶À´Ìá¸ßÆäÔËÐÐЧÂÊ¡£ÔÚ÷è÷ë²Ù×÷ϵͳÖÐ £¬Ä¬ÈϵÄÀú³ÌÓÅÏȼ¶¹æÄ£ÊÇ-20µ½19¡£ÏÂÃæÊÇһЩÀú³ÌÓÅÏȼ¶ÉèÖõÄʾÀý´úÂ룺

£¨1£©µ÷½âÀú³ÌÓÅÏȼ¶£º

renice -20 -p 12345

Îå¡¢ÄÚ´æÖÎÀí

¹ØÓÚϵͳÖеÄÄÚ´æÖÎÀí £¬¿ÉÒÔͨ¹ýµ÷½âÒ³ÃæÖû»Õ½ÂÔºÍÄÚ´æ·ÖÅÉ»úÖÆÀ´Ìá¸ßÐÔÄÜ¡£ÏÂÃæÊÇһЩÄÚ´æÖÎÀíÉèÖõÄʾÀý´úÂ룺

£¨1£©µ÷½âÒ³ÃæÖû»Õ½ÂÔ£º

echo “0” > /proc/sys/vm/swappiness

£¨2£©Ê¹ÓÃhugepages£º

echo “vm.nr_hugepages = 256” >> /etc/sysctl.conf

×ܽ᣺

±¾ÎÄÏÈÈÝÁËÔõÑùÔÚ÷è÷ë²Ù×÷ϵͳÉϾÙÐÐϵͳµÄ¸ß¼¶µ÷ÓźÍÉèÖá£Í¨¹ý¶ÔÄں˲ÎÊýÓÅ»¯¡¢ÎļþϵͳÉèÖá¢IOµ÷Àí·½·¨¡¢Àú³ÌÓÅÏȼ¶ºÍÄÚ´æÖÎÀíµÄµ÷½â £¬¿ÉÒÔʹϵͳÔÚ²î±ðµÄÓ¦Óó¡¾°Öеִï¸üºÃµÄÐÔÄܺÍ˳ӦÐÔ¡£È»¶ø £¬ÏÖʵµÄϵͳµ÷ÓźÍÉèÖÃÒÀÀµÓÚÏêϸµÄÐèÇóºÍÇéÐÎ £¬ÐèҪƾ֤ÏÖÕæÏàÐξÙÐе÷½âºÍÓÅ»¯¡£

²Î¿¼×ÊÁÏ£º

[1] https://github.com/kunpengcompute/khanka/blob/master/tuning_guide.md

ÒÔÉϾÍÊÇÔõÑùÔÚ÷è÷ë²Ù×÷ϵͳÉϾÙÐÐϵͳµÄ¸ß¼¶µ÷ÓźÍÉèÖà £¿µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

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

18523999891

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

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

QR code
ÍøÕ¾µØͼ