LinuxÀú³Ì¿¨¶Ù½â¾öÒªÁì
ÔõÑù½â¾ölinuxϵͳÖзºÆðµÄÀú³Ì¿¨¶ÙÎÊÌâ
µ±ÎÒÃÇÔÚʹÓÃLinux²Ù×÷ϵͳʱ£¬ÓÐʱ¼ä»áÓöµ½Àú³Ì¿¨¶ÙµÄÇéÐΣ¬Õâ¸øÎÒÃǵÄÊÂÇéºÍʹÓôøÀ´ÁËδ±ã¡£Àú³Ì¿¨¶Ù¿ÉÄÜÊÇÓÉÓÚÖÖÖÖÔµ¹ÊÔÓÉÒýÆðµÄ£¬Èç×ÊԴȱ·¦¡¢ËÀËø¡¢IOÛձյȡ£ÔÚ±¾ÎÄÖУ¬ÎÒÃǽ«ÌÖÂÛһЩ½â¾öÀú³Ì¿¨¶ÙÎÊÌâµÄÒªÁìºÍ¼¼ÇÉ¡£
Ê×ÏÈ£¬ÎÒÃÇÐèÒªÃ÷È·Àú³Ì¿¨¶ÙµÄÔµ¹ÊÔÓÉ¡£¿ÉÒÔͨ¹ýÒÔϼ¸ÖÖ·½·¨À´²éÕÒÎÊÌâËùÔÚ£º
ʹÓÃϵͳ¼à¿Ø¹¤¾ß£º¿ÉÒÔʹÓÃÏñtop¡¢htopµÈ¹¤¾ßÀ´Éó²éϵͳµÄ×ÊԴʹÓÃÇéÐΣ¬ÈçCPUÕ¼ÓÃÂÊ¡¢ÄÚ´æʹÓÃÇéÐÎÒÔ¼°IOµÈ¡£Í¨¹ýÊÓ²ìÕâЩָ±ê£¬ÎÒÃÇ¿ÉÒÔÅжÏÊÇ·ñÊÇ×ÊԴȱ·¦µ¼ÖµÄÀú³Ì¿¨¶Ù¡£
Éó²éϵͳÈÕÖ¾£ºÏµÍ³ÈÕÖ¾ÖпÉÄÜ»á¼Í¼һЩ¹ýʧ»òÖÒÑÔÐÅÏ¢£¬¿ÉÒÔͨ¹ýÉó²éϵͳÈÕÖ¾À´ÏàʶÊÇ·ñÓÐÒì³£ÇéÐα¬·¢¡£
Ò»µ©È·¶¨ÁËÀú³Ì¿¨¶ÙµÄÔµ¹ÊÔÓÉ£¬ÎÒÃÇ¿ÉÒÔ½ÓÄÉһЩÏìÓ¦µÄ²½·¥À´½â¾öÎÊÌ⣺
×ÊÔ´µ÷ÓÅ£ºÈôÊÇÊÇ×ÊԴȱ·¦µ¼ÖµÄÀú³Ì¿¨¶Ù£¬ÎÒÃÇ¿ÉÒÔͨ¹ýÓÅ»¯ÏµÍ³ÉèÖÃÀ´ÌáÉýϵͳÐÔÄÜ¡£ÀýÈ磬ÔöÌíÄÚ´æÈÝÁ¿¡¢µ÷½âÎļþϵͳµÄ²ÎÊý¡¢Ìá¸ß´ÅÅÌIOÐÔÄܵȡ£
Àú³ÌÖÎÀí£ºÈôÊÇÊÇÓÉÓÚij¸öÀú³ÌÕ¼ÓÃÁ˹ý¶àµÄ×ÊÔ´µ¼ÖµĿ¨¶Ù£¬ÎÒÃÇ¿ÉÒÔͨ¹ýʹÓÃÀú³ÌÖÎÀí¹¤¾ßÀ´¿ØÖÆÀú³ÌµÄÔËÐС£¿ÉÒÔʹÓÃÏñniceºÍreniceµÈ¹¤¾ßÀ´µ÷½âÀú³ÌµÄÓÅÏȼ¶£¬»òÕßʹÓÃÏñkillºÍpkillµÈÏÂÁîÀ´¿¢Ê²»ÐëÒªµÄÀú³Ì¡£
ËÀËø½â¾ö£ºÈôÊÇÊÇÓÉÓÚËÀËøµ¼ÖµÄÀú³Ì¿¨¶Ù£¬ÎÒÃÇ¿ÉÒÔͨ¹ýʹÓÃÏñpsºÍkillµÈÏÂÁîÀ´¿¢ÊÂËÀËøÀú³Ì£¬»òÕßʹÓÃÏñpstackºÍpmapµÈÏÂÁîÀ´ÆÊÎöÀú³ÌµÄŲÓÃÕ»ºÍÄÚ´æʹÓÃÇéÐΣ¬ÒÔÕÒ³öÔì³ÉËÀËøµÄÔµ¹ÊÔÓÉ¡£
IOÓÅ»¯£ºÈôÊÇÊÇÓÉÓÚIOÛÕ±Õµ¼ÖµĿ¨¶Ù£¬ÎÒÃÇ¿ÉÒÔͨ¹ýʹÓÃÏñiostatºÍiotopµÈ¹¤¾ßÀ´Éó²éϵͳIOÐÔÄÜ£¬»òÕßͨ¹ýµ÷½âÎļþϵͳµÄ²ÎÊýÀ´ÌáÉýIOÐÔÄÜ¡£ÁíÍ⣬¿ÉÒÔʹÓÃÏñniceºÍioniceµÈ¹¤¾ßÀ´µ÷½âÀú³ÌµÄÓÅÏȼ¶ºÍIOµ÷ÀíÕ½ÂÔ£¬ÒÔÈ·±£IO²Ù×÷µÄʵʱÏìÓ¦¡£
±ðµÄ£¬ÎÒÃÇ»¹¿ÉÒÔ½ÓÄÉһЩԤ·À²½·¥À´×èÖ¹Àú³Ì¿¨¶ÙµÄ±¬·¢£º
°´ÆÚά»¤ºÍÓÅ»¯ÏµÍ³£º°´ÆÚ¼ì²éϵͳµÄÉèÖúÍÔËÐÐ״̬£¬ÊµÊ±¸üÐÂϵͳ²¹¶¡£¬ÕûÀí²»ÐëÒªµÄÎļþºÍÀú³Ì£¬ÒÔ¼á³ÖϵͳµÄÎȹÌÐÔºÍÐÔÄÜ¡£
ºÏÀíʹÓÃϵͳ×ÊÔ´£ººÏÀí·ÖÅɺÍʹÓÃϵͳ×ÊÔ´£¬×èֹ̫¹ýÕ¼ÓúÍÆÌÕÅ£¬°ü¹Üÿ¸öÀú³Ì¶¼ÄÜ»ñµÃ×ã¹»µÄ×ÊÔ´¡£
±àд¸ßЧµÄ´úÂ룺ÓÅ»¯´úÂëµÄ½á¹¹ºÍËã·¨£¬ïÔ̲»ÐëÒªµÄ×ÊÔ´ÏûºÄºÍIO²Ù×÷£¬Ìá¸ß´úÂëµÄÖ´ÐÐЧÂÊ¡£
×ÛÉÏËùÊö£¬½â¾öLinuxϵͳÖзºÆðµÄÀú³Ì¿¨¶ÙÎÊÌâÐèÒªÎÒÃǶÔϵͳ¾ÙÐÐÖÜÈ«µÄ¼à¿ØºÍÆÊÎö£¬²¢Æ¾Ö¤ÏêϸÇéÐνÓÄÉÏìÓ¦µÄ²½·¥¡£Í¨¹ýºÏÀíÉèÖÃϵͳ¡¢ÖÎÀíÀú³ÌºÍÓÅ»¯×ÊÔ´µÈÒªÁ죬ÎÒÃÇ¿ÉÒÔÓÐÓõؽâ¾öÀú³Ì¿¨¶ÙÎÊÌ⣬Ìá¸ßϵͳµÄÎȹÌÐÔºÍÐÔÄÜ¡£
ÒÔÉϾÍÊÇLinuxÀú³Ì¿¨¶Ù½â¾öÒªÁìµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡