{"id":3503,"date":"2012-05-17T14:30:11","date_gmt":"2012-05-17T06:30:11","guid":{"rendered":"https:\/\/www.icocean.com\/wp\/?p=3503"},"modified":"2012-05-17T14:30:11","modified_gmt":"2012-05-17T06:30:11","slug":"web%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%93%b6%e9%a2%88%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"https:\/\/www.icocean.com\/blog\/?p=3503","title":{"rendered":"Web\u670d\u52a1\u5668\u74f6\u9888\u5206\u6790"},"content":{"rendered":"<p>\u5e94\u7528\u6309\u56db\u4e2a\u70b9\uff1a<br \/>\n1.CPU\uff08CPU\u5206\u65f6\u91cf\uff09<br \/>\n2.memory<br \/>\n3.I\/O<br \/>\n4.network<!--more--><br \/>\n================<br \/>\n\u4e00\u3000\u7f51\u7edc\u95ee\u9898<br \/>\n\u3000\u3000\u3000\uff11\u5148\u4fdd\u8bc1\u5e26\u5bbd\u8d28\u91cf\u3000\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u5de5\u5177\u770b\u770b\u6d41\u91cf\u591a\u4e0d\u591a\uff0c\u5ef6\u8fdf\u5927\u4e0d\u5927\uff0c\u8fd9\u65b9\u9762\u5de5\u5177\u5f88\u591a\uff0c\u4e0d\u4e3e\u4f8b\u3002<br \/>\n\u3000\u3000\u3000\u3000\u6211\u8fd8\u9047\u5230\u8fc7\u6700\u6076\u5fc3\u7684\u662f\u5ba2\u6237\u7aef\u5f00\u8fc5\u96f7\uff0c\uff22\uff34\uff0c\u7136\u540e\u62b1\u6028\u8bf4\u7f51\u7ad9\u6162\uff0c\u771f\u5fc3\u592a\u9633\u3002<br \/>\n\u3000\u3000\u3000\uff12\u6392\u9664dns\u95ee\u9898\uff0c\u6d4b\u8bd5\u7684\u65f6\u5019\u53ef\u4ee5\u5199hosts\u6587\u4ef6<\/p>\n<p>\u4e8c\u3000\u5185\u5b58\u95ee\u9898<\/p>\n<p>\u3000\u3000\u3000\u53ef\u4ee5\u4f7f\u7528vmstat\u547d\u4ee4\u5b9e\u65f6\u67e5\u770b\u72b6\u6001\uff0c\u5173\u6ce8si ,so ,wa\uff0c\u5982\u679csi,so,\u6bd4\u8f83\u5927\uff0c\u8bf4\u660e\u5185\u5b58\u548cswap\u6709\u4ea4\u4e92\uff0c\u540c\u65f6\u5e94\u8be5wa(io\u7b49\u5f85)\u4e5f\u4f1a\u589e\u5927\uff0c\u53e6\u5916\u7531\u4e8e\u7a0b\u5e8f\u5728cpu\u4e2d\u9891\u7e41\u5207\u6362\uff0ccs\u4e0a\u4e0b\u6587\u4e5f\u4f1a\u6bd4\u6b63\u5e38\u60c5\u51b5\u4e0b\u5927\u3002\u8fd9\u6837\u5c31\u53ef\u4ee5\u57fa\u672c\u786e\u5b9a\u662f\u5185\u5b58\u95ee\u9898\u3000\u5177\u4f53\u7684\u8868\u9762\u73b0\u50cf\u662fcpu\u8017\u5c3d\uff0c\u539f\u56e0\u662f\u5185\u5b58\u4e0d\u591f\u5f15\u8d77swap\u4ea4\u6362\uff0c\u5f15\u8d77io\u589e\u52a0\uff0c\u5f15\u8d77cpu\u8d44\u6e90\u8017\u5c3d\u3002<\/p>\n<p>\u3000\u3000\u89e3\u51b3\u65b9\u6cd5\u52a0\u5185\u5b58<\/p>\n<p>\u4e09\u3000IO\u95ee\u9898<\/p>\n<p>\u3000\u3000\u3000\u3000\u5173\u6ce8vmstat \u8f93\u51fa\u4e2d\u7684bi bo \uff0c\u8fd9\u4e24\u4e2a\u503c\u4ee3\u8868\u6570\u636e\u5757\u7684\u8bfb\u5199\uff0c\u5982\u679c\u6bd4\u8f83\u5927\uff0c\u5e76\u4e14si so\u6ca1\u6709\u4ec0\u4e48\u53d8\u5316\uff0c\u4ee3\u8868\u6709\u786c\u76d8\u8bfb\u5199\uff0c\u4f46\u662f\u4e0d\u6d89\u53ca\u5230swap\uff0c\u3000\u5e76\u914d\u5408wa\u7684\u8f93\u51fa\u6765\u786e\u8ba4\u662f\u4e0d\u662f\u53d1\u751f\u5927\u91cfio\u7b49\u5f85\u3002\u5982\u679c\u6709\u4ee3\u8868\u662f\u56e0\u4e3a\u786c\u76d8\u8bfb\u5199\u6570\u636e\u8fc7\u6162\uff0c\u5bfc\u81f4iowait\u8fc7\u5927\uff0c\u5177\u4f53\u7684\u8868\u9762\u73b0\u50cf\u662fcpu\u8017\u5c3d\uff0c\u539f\u56e0\u662f\u786c\u76d8\u8bfb\u5199\u8fc7\u591a\uff0c\u592a\u6162\uff0c\u5f15\u8d77io\u589e\u52a0\uff0c\u5f15\u8d77cpu\u8d44\u6e90\u8017\u5c3d\u3002<\/p>\n<p>\u3000\u3000\u3000\u3000\u89e3\u51b3\u65b9\u6cd5\u3000\u589e\u52a0IO\u80fd\u529b\uff0c\u786c\u76d8\u505araid\u3002<\/p>\n<p>\u56db\uff1acpu\u95ee\u9898<\/p>\n<p>\u3000\u3000\u3000\u3000\u67e5\u770bvmstat \u8f93\u51fa\u4e2d\u7684 r,b\u4e24\u5217\uff0c\u770b\u770b\u662f\u5426\u6709\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b\uff0c\u548c\u7b49\u5f85\u8fdb\u7a0b\uff0c\u5982\u679c\u6b63\u5728\u8fd0\u884c\u8fdb\u7a0b\u6570\u91cf\u6bd4\u4f60\u7684cpu\u6838\u6570\u591a\uff0c\u8bf4\u660ecpu\u8d85\u8d1f\u8f7d\u4e86\uff0c\u540c\u65f6\u770b\u770bbi bo\u7684\u60c5\u51b5\uff0c\u5982\u679c\u6ca1\u4ec0\u4e48\u6570\u636e\u8bfb\u5199\uff0c\u8bf4\u660e\u6ca1IO\u95ee\u9898\uff0ccpu\u7684\u7eaf\u505a\u8fd0\u7b97\uff0c\u8fd9\u65f6us\uff08\u7528\u6237\u6001\u8fdb\u7a0b\u5360\u7528CPU\u6bd4\u7387\uff09\u7684\u8f93\u51fa\u5e94\u8be5\u4f1a\u6bd4\u8f83\u9ad8\uff0c\u8bf4\u660e\u662fcpu\u4e0d\u591f\u3002<\/p>\n<p>\u3000\u3000\u3000\u3000\u89e3\u51b3\u65b9\u6cd5\u3000\u589e\u52a0cpu\u3000\u6216\u8005\u6dfb\u52a0\u591a\u673a\u505alvs\u96c6\u7fa4\u3002<\/p>\n<p>\u4ee5\u4e0a\u53ea\u662f\u8349\u8349\u5206\u6790\uff0c\u771f\u5b9e\u60c5\u51b5\u4f1a\u590d\u6742\u7684\u591a\uff0c\u6bd4\u5982\u3000\u53d1\u73b0\u662fio\u3000\u8fd8\u8981cat \/proc\/diskstats \u786e\u5b9a\u662f\u54ea\u4e2a\u5206\u533a\u8bfb\u5199\u591a\uff0cIOPS\u662f\u5426\u8d85\u8fc7\u786c\u76d8\u7684\u80fd\u529b\uff0ctop \u548cfuser\u770b\u54ea\u4e2a\u5e94\u7528\u7a0b\u5e8f\u8bfb\uff0c\u770b\u5e94\u7528\u65e5\u5fd7\u7a0b\u5e8f\u65e5\u5fd7\u548c\u7cfb\u7edf\u65e5\u5fd7\u6216\u8005strace\u770b\u5728\u8bfb\u4ec0\u4e48\u4e1c\u897f\u3000\uff0c\u7136\u540e\u505a\u76f8\u5e94\u4f18\u5316\u3002<\/p>\n<p>\u3000\u3000\u3000\u3000\u8c03\u4f18\u4e0d\u662f\u4e00\u6b65\u4e24\u6b65\u53ef\u4ee5\u5b8c\u6210\u7684\uff0c\u8981\u8003\u8651\u5f88\u591a\u95ee\u9898\uff0c\u5efa\u8bae\u4f60\u4e0b\u6b21\u5728\u7ed9\u51fa\u95ee\u9898\u7684\u65f6\u5019\u80fd\u591f\u518d\u5177\u4f53\u5316\u4e9b\u80fd\u5c06\u7528\u8fc7\u7684\u76d1\u63a7\u547d\u4ee4\u7684\u6570\u636e\u503c\u8d34\u51fa\u6765\u4e00\u8d77\u5206\u6790\uff0c\u5426\u5219\u5f88\u96be\u7ed9\u51fa\u6b63\u786e\u7684\u89e3\u51b3\u65b9\u6cd5\u3002<\/p>\n<p>\u3000\u3000\u3000\u3000\u8def\u6f2b\u6f2b\u5176\u4fee\u8fdc\uff0c\u795d\u4f60\u80fd\u8c03\u4f18\u6210\u529f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5e94\u7528\u6309\u56db\u4e2a\u70b9\uff1a 1.CPU\uff08CPU\u5206\u65f6\u91cf\uff09 2.memory 3.I\/O 4.network<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-3503","post","type-post","status-publish","format-standard","hentry","category-lamp","category-24-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3503"}],"version-history":[{"count":1,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3503\/revisions"}],"predecessor-version":[{"id":3504,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3503\/revisions\/3504"}],"wp:attachment":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}