{"id":934,"date":"2018-04-04T10:46:13","date_gmt":"2018-04-04T02:46:13","guid":{"rendered":"https:\/\/www.xiaobo.li\/?p=934"},"modified":"2019-01-08T03:04:23","modified_gmt":"2019-01-07T19:04:23","slug":"%e7%a3%81%e7%9b%98iops%e7%9a%84%e8%ae%a1%e7%ae%97","status":"publish","type":"post","link":"https:\/\/www.xiaobo.li\/notes\/archives\/934","title":{"rendered":"\u78c1\u76d8IOPS\u7684\u8ba1\u7b97"},"content":{"rendered":"<div id=\"cnblogs_post_body\" class=\"blogpost-body\">\n<div>\n<div>\u8ba1\u7b97\u78c1\u76d8IOPS\u7684\u4e09\u4e2a\u56e0\u7d20\uff1a<\/div>\n<div>1\u3001RAID\u7c7b\u578b\u7684\u8bfb\u5199\u6bd4<\/div>\n<div>\n<p>\u4e0d\u540cRAID\u7c7b\u578b\u7684IOPS\u8ba1\u7b97\u516c\u5f0f\uff1a<\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"196\">\n<p align=\"center\"><strong>RAID<\/strong><strong>\u7c7b\u578b<\/strong><\/p>\n<\/td>\n<td valign=\"top\" width=\"372\">\n<p align=\"center\"><strong>\u516c\u5f0f<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"196\">RAID5\u3001RAID3<\/td>\n<td valign=\"top\" width=\"372\">Drive IOPS=Read IOPS + 4*Write IOPS<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"196\">RAID6<\/td>\n<td valign=\"top\" width=\"372\">Drive IOPS=Read IOPS + \u00a06*Write IOPS<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"196\">RAID1\u3001RAID10<\/td>\n<td valign=\"top\" width=\"372\">Drive IOPS=Read IOPS + 2*Write IOPS<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div>2\u3001\u786c\u76d8\u7c7b\u578b\u7684IOPS\u503c<\/div>\n<\/div>\n<div>\n<p>\u4e0d\u540c\u78c1\u76d8\u7c7b\u578b\u7684IOPS\uff1a<\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"196\">\n<p align=\"center\"><strong>\u786c\u76d8\u7c7b\u578b<\/strong><\/p>\n<\/td>\n<td valign=\"top\" width=\"372\">\n<p align=\"center\"><strong>IOPS<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"196\">FC 15K RPM<\/td>\n<td valign=\"top\" width=\"372\">180<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"196\">FC 10K RPM<\/td>\n<td valign=\"top\" width=\"372\">140<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"196\">SAS 15K RPM<\/td>\n<td valign=\"top\" width=\"372\">180<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"196\">SAS 10K RPM<\/td>\n<td valign=\"top\" width=\"372\">150<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"196\">SATA 10K RPM<\/td>\n<td valign=\"top\" width=\"372\">290<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"196\">SATA 7.2K RPM<\/td>\n<td valign=\"top\" width=\"372\">80<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"196\">SATA 5.4K RPM<\/td>\n<td valign=\"top\" width=\"372\">40<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"196\">Flash drive<\/td>\n<td valign=\"top\" width=\"372\">2500<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div>\n<div>\n<div>3\u3001\u5177\u4f53\u4e1a\u52a1\u7cfb\u7edf\u7684\u8bfb\u5199\u6bd4<\/div>\n<\/div>\n<\/div>\n<p>\u4e8c\u3001\u6848\u4f8b<\/p>\n<p>1) \u4e1a\u52a1\u9700\u6c42\uff1a 10TB \u7684FC 15K RPM\u5b58\u50a8\u7a7a\u95f4\uff0c\u6ee1\u8db36000 IOPS\uff0c\u8ba1\u7b97RAID5\uff0cRAID10\u5206\u522b\u9700\u8981\u591a\u5c11\u5757\u786c\u76d8\uff1f<\/p>\n<p>\u9996\u5148\u9700\u8981\u77e5\u9053I\/O\u4e2d\u8bfb\u64cd\u4f5c\u4e0e\u5199\u64cd\u4f5c\u6240\u5360\u7684\u767e\u5206\u6bd4\u3002\u00a0\u5047\u5b9a6000\u00a0IOPS\u4e2d\u8bfb\/\u5199\u6bd4\u662f2\uff1a1<\/p>\n<div>\u00a0 \u00a0\u00a0\u4e0d\u540c\u7684RAID\u7c7b\u578bDrive\u00a0\u786c\u76d8\u5b9e\u9645IOPS\u8d1f\u8f7d\u5206\u522b\u5982\u4e0b\uff1a<\/div>\n<p>RAID10\uff1a\uff082\/3\uff09*6000+2*\uff081\/3\uff09*6000= 8000 IOPS<\/p>\n<p>RAID5\uff1a\uff082\/3\uff09*6000+4*\uff081\/3\uff09*6000=12000 IOPS<\/p>\n<p>\u53c2\u7167\u4e0d\u540c\u786c\u76d8\u7c7b\u578b\u7684IOPS\u503c\uff0c\u6362\u7b97\u51fa\u9700\u8981\u591a\u5c11\u5757\u76d8\uff1a<\/p>\n<p>RAID10\uff1a8000\u00a0\/180 = 45\u5757<\/p>\n<p>RAID5\uff1a12000\/180 =67\u5757<\/p>\n<p>2) \u00a0 \u00a0\u4e00\u4e2aRAID5\uff0c\u662f\u75315\u5757500G 10K RPM\u7684FC\u76d8\u7ec4\u6210\uff0c\u6362\u7b97\u51fa\u8be5RAID\u652f\u6301\u7684\u6700\u5927IOPS\u4ee5\u53ca\u80fd\u591f\u7ed9\u524d\u7aef\u5e94\u7528\u63d0\u4f9b\u7684IOPS\uff1f<\/p>\n<p>\u9996\u514810K RPM\u7684FC\u76d8\uff0c\u5355\u5757\u76d8\u7684IOPS\u4e3a140\uff0c5\u5757\u76d8\u6700\u5927IOPS\u503c\u4e3a700\u3002<\/p>\n<p>\u5047\u8bbe\u8bfb\u5199\u6bd4\u4e3a2\uff1a1\uff0c\u80fd\u591f\u63d0\u4f9b\u7ed9\u524d\u7aef\u5e94\u7528\u7684IOPS\u4e3a\uff1a<\/p>\n<p>\uff082\/3\uff09*X+4*\uff081\/3\uff09*X = 700<\/p>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 \u00a02*X = 700<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0X=350<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u80fd\u591f\u63d0\u4f9b\u7ed9\u524d\u7aef\u5e94\u7528\u7684IOPS\u4e3a350\u3002<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div><\/div>\n<div><\/div>\n<div>\n<h2>\u4e09. IOPS \u8bf4\u660e<\/h2>\n<h3>3.1 IOPS\u00a0(Input\/OutputPer Second)<\/h3>\n<p>IOPS\u00a0\u5373\u6bcf\u79d2\u7684\u8f93\u5165\u8f93\u51fa\u91cf(\u6216\u8bfb\u5199\u6b21\u6570)\uff0c\u662f\u8861\u91cf\u78c1\u76d8\u6027\u80fd\u7684\u4e3b\u8981\u6307\u6807\u4e4b\u4e00\u3002IOPS\u662f\u6307\u5355\u4f4d\u65f6\u95f4\u5185\u7cfb\u7edf\u80fd\u5904\u7406\u7684I\/O\u8bf7\u6c42\u6570\u91cf\uff0c\u4e00\u822c\u4ee5\u6bcf\u79d2\u5904\u7406\u7684I\/O\u8bf7\u6c42\u6570\u91cf\u4e3a\u5355\u4f4d\uff0cI\/O\u8bf7\u6c42\u901a\u5e38\u4e3a\u8bfb\u6216\u5199\u6570\u636e\u64cd\u4f5c\u8bf7\u6c42\u3002\u968f\u673a\u8bfb\u5199\u9891\u7e41\u7684\u5e94\u7528\uff0c\u5982OLTP(OnlineTransaction Processing)\uff0cIOPS\u662f\u5173\u952e\u8861\u91cf\u6307\u6807\u3002<\/p>\n<p>\u53e6\u4e00\u4e2a\u91cd\u8981\u6307\u6807\u662f\u6570\u636e\u541e\u5410\u91cf(Throughput)\uff0c\u6307\u5355\u4f4d\u65f6\u95f4\u5185\u53ef\u4ee5\u6210\u529f\u4f20\u8f93\u7684\u6570\u636e\u6570\u91cf\u3002\u5bf9\u4e8e\u5927\u91cf\u987a\u5e8f\u8bfb\u5199\u7684\u5e94\u7528\uff0c\u5982VOD(Video On Demand)\uff0c\u5219\u66f4\u5173\u6ce8\u541e\u5410\u91cf\u6307\u6807\u3002<\/p>\n<p>\u4f20\u7edf\u78c1\u76d8\u672c\u8d28\u4e0a\u4e00\u79cd\u673a\u68b0\u88c5\u7f6e\uff0c\u5982FC, SAS, SATA\u78c1\u76d8\uff0c\u8f6c\u901f\u901a\u5e38\u4e3a5400\/7200\/10K\/15K rpm\u4e0d\u7b49\u3002\u5f71\u54cd\u78c1\u76d8\u7684\u5173\u952e\u56e0\u7d20\u662f\u78c1\u76d8\u670d\u52a1\u65f6\u95f4\uff0c\u5373\u78c1\u76d8\u5b8c\u6210\u4e00\u4e2aI\/O\u8bf7\u6c42\u6240\u82b1\u8d39\u7684\u65f6\u95f4\uff0c\u5b83\u7531\u5bfb\u9053\u65f6\u95f4\u3001\u65cb\u8f6c\u5ef6\u8fdf\u548c\u6570\u636e\u4f20\u8f93\u65f6\u95f4\u4e09\u90e8\u5206\u6784\u6210\u3002<\/p>\n<p>\uff081\uff09\u5bfb\u9053\u65f6\u95f4<\/p>\n<p>Tseek\u662f\u6307\u5c06\u8bfb\u5199\u78c1\u5934\u79fb\u52a8\u81f3\u6b63\u786e\u7684\u78c1\u9053\u4e0a\u6240\u9700\u8981\u7684\u65f6\u95f4\u3002\u5bfb\u9053\u65f6\u95f4\u8d8a\u77ed\uff0cI\/O\u64cd\u4f5c\u8d8a\u5feb\uff0c\u76ee\u524d\u78c1\u76d8\u7684\u5e73\u5747\u5bfb\u9053\u65f6\u95f4\u4e00\u822c\u57283\uff0d15ms\u3002<\/p>\n<p>\uff082\uff09\u65cb\u8f6c\u5ef6\u8fdf<\/p>\n<p>Trotation\u662f\u6307\u76d8\u7247\u65cb\u8f6c\u5c06\u8bf7\u6c42\u6570\u636e\u6240\u5728\u6247\u533a\u79fb\u81f3\u8bfb\u5199\u78c1\u5934\u4e0b\u65b9\u6240\u9700\u8981\u7684\u65f6\u95f4\u3002\u65cb\u8f6c\u5ef6\u8fdf\u53d6\u51b3\u4e8e\u78c1\u76d8\u8f6c\u901f\uff0c\u901a\u5e38\u4f7f\u7528\u78c1\u76d8\u65cb\u8f6c\u4e00\u5468\u6240\u9700\u65f6\u95f4\u76841\/2\u8868\u793a\u3002\u6bd4\u5982\uff0c7200 rpm\u7684\u78c1\u76d8\u5e73\u5747\u65cb\u8f6c\u5ef6\u8fdf\u5927\u7ea6\u4e3a60*1000\/7200\/2 = 4.17ms\uff0c\u800c\u8f6c\u901f\u4e3a15000 rpm\u7684\u78c1\u76d8\u5176\u5e73\u5747\u65cb\u8f6c\u5ef6\u8fdf\u7ea6\u4e3a2ms\u3002<\/p>\n<p>\uff083\uff09\u6570\u636e\u4f20\u8f93\u65f6\u95f4<\/p>\n<p>Ttransfer\u662f\u6307\u5b8c\u6210\u4f20\u8f93\u6240\u8bf7\u6c42\u7684\u6570\u636e\u6240\u9700\u8981\u7684\u65f6\u95f4\uff0c\u5b83\u53d6\u51b3\u4e8e\u6570\u636e\u4f20\u8f93\u7387\uff0c\u5176\u503c\u7b49\u4e8e\u6570\u636e\u5927\u5c0f\u9664\u4ee5\u6570\u636e\u4f20\u8f93\u7387\u3002\u76ee\u524dIDE\/ATA\u80fd\u8fbe\u5230133MB\/s\uff08MBPS\uff09\uff0cSATA II\u53ef\u8fbe\u5230300MB\/s\u7684\u63a5\u53e3\u6570\u636e\u4f20\u8f93\u7387\uff0c\u6570\u636e\u4f20\u8f93\u65f6\u95f4\u901a\u5e38\u8fdc\u5c0f\u4e8e\u524d\u4e24\u90e8\u5206\u65f6\u95f4\u3002<\/p>\n<p>IOPS\uff08\u6bcf\u79d2IO\u6b21\u6570\uff09 = 1s\/(\u5bfb\u9053\u65f6\u95f4+\u65cb\u8f6c\u5ef6\u8fdf+\u6570\u636e\u4f20\u8f93\u65f6\u95f4)<\/p>\n<p>\u56e0\u6b64\uff0c\u7406\u8bba\u4e0a\u53ef\u4ee5\u8ba1\u7b97\u51fa\u78c1\u76d8\u7684\u6700\u5927IOPS\uff0c\u5373IOPS = 1000ms\/ (Tseek + Troatation)\uff0c\u5ffd\u7565\u6570\u636e\u4f20\u8f93\u65f6\u95f4\u3002\u5047\u8bbe\u78c1\u76d8\u5e73\u5747\u7269\u7406\u5bfb\u9053\u65f6\u95f4\u4e3a3ms, \u78c1\u76d8\u8f6c\u901f\u4e3a7200,10K,15Krpm\uff0c\u5219\u78c1\u76d8IOPS\u7406\u8bba\u6700\u5927\u503c\u5206\u522b\u4e3a:<\/p>\n<p>IOPS = 1000 \/ (3 + 60000\/7200\/2)\u00a0 = 140<br \/>\nIOPS = 1000 \/ (3 + 60000\/10000\/2) = 167<br \/>\nIOPS = 1000 \/ (3 + 60000\/15000\/2) = 200<\/p>\n<h3>3.2 \u56fa\u6001\u786c\u76d8\u7684IOPS<\/h3>\n<p>\u56fa\u6001\u786c\u76d8SSD\u662f\u4e00\u79cd\u7535\u5b50\u88c5\u7f6e\uff0c \u907f\u514d\u4e86\u4f20\u7edf\u78c1\u76d8\u5728\u5bfb\u9053\u548c\u65cb\u8f6c\u4e0a\u7684\u65f6\u95f4\u82b1\u8d39\uff0c\u5b58\u50a8\u5355\u5143\u5bfb\u5740\u5f00\u9500\u5927\u5927\u964d\u4f4e\uff0c\u56e0\u6b64IOPS\u53ef\u4ee5\u975e\u5e38\u9ad8\uff0c\u80fd\u591f\u8fbe\u5230\u6570\u4e07\u751a\u81f3\u6570\u5341\u4e07\u3002\u5b9e\u9645\u6d4b\u91cf\u4e2d\uff0cIOPS\u6570\u503c\u4f1a\u53d7\u5230\u5f88\u591a\u56e0\u7d20\u7684\u5f71\u54cd\uff0c\u5305\u62ecI\/O\u8d1f\u8f7d\u7279\u5f81(\u8bfb\u5199\u6bd4\u4f8b\uff0c\u987a\u5e8f\u548c\u968f\u673a\uff0c\u5de5\u4f5c\u7ebf\u7a0b\u6570\uff0c\u961f\u5217\u6df1\u5ea6\uff0c\u6570\u636e\u8bb0\u5f55\u5927\u5c0f)\u3001\u7cfb\u7edf\u914d\u7f6e\u3001\u64cd\u4f5c\u7cfb\u7edf\u3001\u78c1\u76d8\u9a71\u52a8\u7b49\u7b49\u3002\u56e0\u6b64\u5bf9\u6bd4\u6d4b\u91cf\u78c1\u76d8IOPS\u65f6\uff0c\u5fc5\u987b\u5728\u540c\u6837\u7684\u6d4b\u8bd5\u57fa\u51c6\u4e0b\u8fdb\u884c\uff0c\u5373\u4fbf\u5982\u4f55\u4e5f\u4f1a\u4ea7\u751f\u4e00\u5b9a\u7684\u968f\u673a\u4e0d\u786e\u5b9a\u6027\u3002<\/p>\n<p>\u901a\u5e38\u60c5\u51b5\u4e0b\uff0cIOPS\u53ef\u7ec6\u5206\u4e3a\u5982\u4e0b\u51e0\u4e2a\u6307\u6807\uff1a<\/p>\n<p>Toatal IOPS\uff1a\u6df7\u5408\u8bfb\u5199\u548c\u987a\u5e8f\u968f\u673aI\/O\u8d1f\u8f7d\u60c5\u51b5\u4e0b\u7684\u78c1\u76d8IOPS\uff0c\u8fd9\u4e2a\u4e0e\u5b9e\u9645I\/O\u60c5\u51b5\u6700\u4e3a\u76f8\u7b26\uff0c\u5927\u591a\u6570\u5e94\u7528\u5173\u6ce8\u6b64\u6307\u6807\u3002<\/p>\n<p>Random Read IOPS\uff1a100%\u968f\u673a\u8bfb\u8d1f\u8f7d\u60c5\u51b5\u4e0b\u7684IOPS\u3002<\/p>\n<p>Random WriteIOPS\uff1a100%\u968f\u673a\u5199\u8d1f\u8f7d\u60c5\u51b5\u4e0b\u7684IOPS\u3002<\/p>\n<p>Sequential ReadIOPS\uff1a100%\u987a\u5e8f\u8d1f\u8f7d\u8bfb\u60c5\u51b5\u4e0b\u7684IOPS\u3002<\/p>\n<p>Sequential WriteIOPS\uff1a100%\u987a\u5e8f\u5199\u8d1f\u8f7d\u60c5\u51b5\u4e0b\u7684IOPS\u3002<\/p>\n<\/div>\n<div><\/div>\n<div><\/div>\n<div>\u6587\u7ae0\u6765\u6e90\uff1a https:\/\/www.cnblogs.com\/renyb\/p\/3698664.html<\/div>\n<div><\/div>\n<div>CentOS\/Redhat IO view:<\/div>\n<div>yum install iotop -y<\/div>\n<div>sudo iotop<\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u8ba1\u7b97\u78c1\u76d8IOPS\u7684\u4e09\u4e2a\u56e0\u7d20\uff1a 1\u3001RAID\u7c7b\u578b\u7684\u8bfb\u5199\u6bd4 \u4e0d\u540cRAID\u7c7b\u578b\u7684IOP &hellip; <a href=\"https:\/\/www.xiaobo.li\/notes\/archives\/934\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[292],"tags":[],"class_list":["post-934","post","type-post","status-publish","format-standard","hentry","category-storage"],"_links":{"self":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/934","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/comments?post=934"}],"version-history":[{"count":0,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/934\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/media?parent=934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/categories?post=934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/tags?post=934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}