{"id":28,"date":"2016-07-26T18:22:01","date_gmt":"2016-07-26T10:22:01","guid":{"rendered":"http:\/\/ayonel.me\/?p=28"},"modified":"2016-08-25T01:48:08","modified_gmt":"2016-08-24T17:48:08","slug":"ecs_test","status":"publish","type":"post","link":"https:\/\/ayonel.malash.net\/index.php\/2016\/07\/26\/ecs_test\/","title":{"rendered":"\u82e6\u903c\u7684\u4e00\u5929\uff1a\u8fd0\u7ef4\u771f\u8f9b\u82e6"},"content":{"rendered":"<p>\u4eca\u5929\u6253\u7b97\u597d\u597d\u6d4b\u4e00\u4e0b\u6211\u4eec\u7684\u54d2\u54d2\u76f8\u673aAPP (\u53cb\u60c5\u5e7f\u544a\u4e00\u6ce2,<a href=\"http:\/\/dada.dimeratech.com\">\u4e0b\u8f7d\u94fe\u63a5<\/a>)\u7684\u540e\u53f0\u6027\u80fd\u3002\u76ee\u524d\u54d2\u54d2\u76f8\u673aAPP\u53ea\u7528\u4e86\u4e00\u53f0\u963f\u91cc\u4e91ECS(1\u6838CPU\u30012G\u5185\u5b58~~). \u4e3a\u4e86\u5f00\u53d1\u6d4b\u8bd5, \u53c8\u4e70\u4e86\u4e00\u53f0\u7528\u4f5c\u6d4b\u8bd5\u670d\u52a1\u5668(1\u6838CPU\u30011G\u5185\u5b58).\u00a0\u540e\u53f0\u73af\u5883\u4e3aubuntu14.04\u3001nginx 1.4\u3001mysql 5.6 \u4ee5\u53caphp5.6.<\/p>\n<p>\u7528ab\u5206\u522b\u5728\u6b63\u5f0f\u670d\u52a1\u5668\u548c\u6d4b\u8bd5\u670d\u52a1\u5668\u5bf9\u540c\u4e00\u4e2aphp\u6587\u4ef6\u8fdb\u884c\u8bfb\u53d6\uff0c\u53d1\u73b0\u5728\u540c\u7b49\u538b\u529b\u4e0b\u6d4b\u8bd5\u670d\u52a1\u5668\u7684\u901f\u5ea6\u5c31\u662f\u8981\u6bd4\u6b63\u5f0f\u670d\u52a1\u5668\u9ad8\u3002\u8fd9\u53ef\u5c31\u90c1\u95f7\u6b7b\u6211\u4e86\uff0c\u4f60\u8bf4\u4e00\u6837\u7684\u914d\u7f6e\uff0c\u6b63\u5f0f\u670d\u52a1\u5668\u8fd8\u6bd4\u6d4b\u8bd5\u670d\u52a1\u5668\u591a\u4e86\u4e00\u500d\u5185\u5b58\uff0c\u4e3a\u6bdb\u5e76\u53d1\u8fd8\u6bd4\u4e0d\u4e0a\u6d4b\u8bd5\u670d\u52a1\u5668\uff1f\u8fd9\u4e00\u6574\u5929\u5c31\u8017\u5728\u8fd9\u4e2a\u95ee\u9898\u4e0a\u4e86\u3002<\/p>\n<p>\u521a\u5f00\u59cb\u6211\u4ee5\u4e3a\u662fPHP\u914d\u7f6e\u7684\u95ee\u9898\uff0c\u5bf9\u6bd4\u4e86\u4e24\u53f0\u670d\u52a1\u5668\u7684PHP\u914d\u7f6e\u9879\uff0c\u5173\u4e8ecache\u4ee5\u53camemory\u7684\u90fd\u4e00\u6837\u554a\uff0c\u4e3a\u4e86\u6392\u9664\u662f\u5426\u662fPHP\u7684\u539f\u56e0\uff0c\u6211\u5c06\u6d4b\u8bd5PHP\u6587\u4ef6\u6362\u4e3a\u4e86\u4e00\u5f204KB\u7684\u56fe\u7247\uff0c\u7ee7\u7eedAB\uff1a<\/p>\n<p>\u8fd9\u662f\u6b63\u5f0f\u670d\u52a1\u5668100\u5e76\u53d1\u7ed3\u679c\uff0c\u5982\u4e0b\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-29\" src=\"https:\/\/ayonel.malash.net\/wp-content\/uploads\/2016\/07\/ab-300x147.jpg\" alt=\"\u6b63\u5f0f\u670d\u52a1\u5668AB\" width=\"300\" height=\"147\" srcset=\"https:\/\/ayonel.malash.net\/wp-content\/uploads\/2016\/07\/ab-300x147.jpg 300w, https:\/\/ayonel.malash.net\/wp-content\/uploads\/2016\/07\/ab-768x376.jpg 768w, https:\/\/ayonel.malash.net\/wp-content\/uploads\/2016\/07\/ab.jpg 868w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>\u8fd9\u662f\u6d4b\u8bd5\u670d\u52a1\u5668100\u5e76\u53d1\u7ed3\u679c\uff0c\u5982\u4e0b\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-30\" src=\"https:\/\/ayonel.malash.net\/wp-content\/uploads\/2016\/07\/abtest-300x144.jpg\" alt=\"abtest\" width=\"300\" height=\"144\" srcset=\"https:\/\/ayonel.malash.net\/wp-content\/uploads\/2016\/07\/abtest-300x144.jpg 300w, https:\/\/ayonel.malash.net\/wp-content\/uploads\/2016\/07\/abtest-768x369.jpg 768w, https:\/\/ayonel.malash.net\/wp-content\/uploads\/2016\/07\/abtest.jpg 875w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>\u53ef\u4ee5\u770b\u5230\u6d4b\u8bd5\u670d\u52a1\u5668\u54cd\u5e94\u901f\u5ea6\u8fd8\u662f\u8981\u660e\u663e\u9ad8\u4e8e\u6b63\u5f0f\u670d\u52a1\u5668\uff08\u591a\u6b21\u6362\u6587\u4ef6\u6d4b\u8bd5\uff0c\u901f\u5ea6\u5927\u6982\u9ad81\/3\uff09\uff0c\u8fd9\u5c31\u6392\u9664\u4e86\u662fPHP\u7684\u95ee\u9898\uff1b\u90a3\u5c31\u53ea\u6709nginx\u4e86\u3002\u53c8\u53cd\u590d\u67e5\u770b\u4e86\u4e24\u53f0nginx\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u4e5f\u662f\u4e00\u6837\uff0c\u671f\u95f4\u8fd8\u505a\u4e86\u5f88\u591a\u4e71\u4e03\u516b\u7cdf\u7684\u6d4b\u8bd5\uff0c\u8fd8\u662f\u6ca1\u80fd\u627e\u51fa\u539f\u56e0\u3002<\/p>\n<p>\u8fd9\u65f6\u6211\u7a81\u7136\u610f\u8bc6\u5230\u4f1a\u4e0d\u4f1a\u662f\u786c\u4ef6\u7684\u95ee\u9898\uff0c\u4e24\u53f0\u670d\u52a1\u5668\u90fd\u662f\u963f\u91cc\u4e91\uff0c\u4f46\u662f\u4e70\u7684\u65f6\u5019\u5148\u4e70\u4e86\u6b63\u5f0f\u670d\u52a1\u5668\uff0c\u6700\u8fd1\u624d\u4e70\u7684\u8fd9\u4e2a\u6d4b\u8bd5\u670d\u52a1\u5668\u3002\u867d\u7136\u4e70\u7684\u65f6\u5019\u90fd\u9009\u7684\u540c\u6837\u7684\u914d\u7f6e\uff0c\u4f46\u662f\u963f\u91cc\u4e91\u5c4f\u853d\u4e86\u5f88\u591a\u786c\u4ef6\u7ec6\u8282\u7684\u4e1c\u897f\uff0c\u53ea\u544a\u8bc9\u4f60CPU\u8981\u51e0\u6838\uff0c\u5185\u5b58\u8981\u591a\u5927\u3002\u3002\u3002<\/p>\n<ol>\n<li>\u5148\u6d4b\u4e24\u8005\u7684\u786c\u76d8\u8bfb\u5199\u901f\u7387\uff0c\u6211\u7528\u7684\u662fhdpram\uff0c\u9700\u8981\u5148\u5b89\u88c5.<br \/>\n\u6b63\u5f0f\u670d\u52a1\u5668\u4e3a\uff1a<br \/>\n&gt;hdparm -tT \/dev\/xvda<br \/>\n\/dev\/xvda:<br \/>\nTiming cached reads: 15612 MB in 1.99 seconds = <strong>7845.40<\/strong> MB\/sec<br \/>\nTiming buffered disk reads: 238 MB in 3.02 seconds = <strong>78.92<\/strong> MB\/sec<br \/>\n\u6d4b\u8bd5\u670d\u52a1\u5668\u4e3a\uff1a<br \/>\n\/dev\/xvda:<br \/>\nTiming cached reads: 17848 MB in 2.00 seconds = <strong>8932.35<\/strong> MB\/sec<br \/>\nTiming buffered disk reads: 240 MB in 3.00 seconds = <strong>79.90<\/strong> MB\/sec<br \/>\n\u4ee5\u4e0a\u7ed3\u679c\u6d4b\u8bd5\u4e86\u591a\u904d\uff0c\u5747\u663e\u793a\u6d4b\u8bd5\u670d\u52a1\u5668\u78c1\u76d8\u7684\u8bfb\u901f\u7387\u8981\u6bd4\u6b63\u5f0f\u670d\u52a1\u5668\u78c1\u76d8\u9ad8\u51fa14%\uff0c\u4e24\u8005\u7684\u5199\u5dee\u4e0d\u591a\u3002\u5230\u8fd9\u6211\u8fd8\u662f\u4e0d\u592a\u76f8\u4fe1\u4e24\u53f0\u670d\u52a1\u5668\u5e76\u53d1\u91cf\u7684\u5dee\u522b\u5b8c\u5168\u662f\u7531\u78c1\u76d8\u5bfc\u81f4\u7684\u3002<\/li>\n<li>\u6211\u53c8\u67e5\u770b\u4e86\u4e24\u8005\u7684CPU \u4fe1\u606f\uff0c\u547d\u4ee4: cat \/proc\/cpuinfo<br \/>\n\u6b63\u5f0f\u670d\u52a1\u5668\u7ed3\u679c\u4e3a\uff1a<br \/>\nprocessor : 0<br \/>\nvendor_id : GenuineIntel<br \/>\ncpu family : 6<br \/>\nmodel : 45<br \/>\nmodel name : <strong>Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz(\u578b\u53f7)<\/strong><br \/>\nstepping : 7<br \/>\nmicrocode : 0x70d<br \/>\ncpu MHz :<strong> 2300.102\uff08\u9891\u7387\uff09<\/strong><br \/>\ncache size : <strong>15360 KB(\u7f13\u5b58\u5927\u5c0f)<\/strong><br \/>\nphysical id : 0<br \/>\nsiblings : 1<br \/>\ncore id : 0<br \/>\ncpu cores : 1<br \/>\napicid : 0<br \/>\ninitial apicid : 0<br \/>\nfpu : yes<br \/>\nfpu_exception : yes<br \/>\ncpuid level : 13<br \/>\nwp : yes<br \/>\nflags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl pni ssse3 cx16 sse4_1 sse4_2 popcnt aes hypervisor lahf_lm<br \/>\nbogomips : 4600.20<br \/>\nclflush size : 64<br \/>\ncache_alignment : 64<br \/>\naddress sizes : 46 bits physical, 48 bits virtual<br \/>\npower management:<br \/>\n\u6d4b\u8bd5\u670d\u52a1\u5668\u7ed3\u679c\u4e3a\uff1a<br \/>\nprocessor : 0<br \/>\nvendor_id : GenuineIntel<br \/>\ncpu family : 6<br \/>\nmodel : 62<br \/>\nmodel name :<strong> Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz\uff08CPU\u578b\u53f7\uff09<\/strong><br \/>\nstepping : 4<br \/>\nmicrocode : 0x428<br \/>\ncpu MHz : <strong>2593.838\uff08\u9891\u7387\uff09<\/strong><br \/>\ncache size : <strong>20480 KB\uff08\u7f13\u5b58\u5927\u5c0f\uff09<\/strong><br \/>\nphysical id : 0<br \/>\nsiblings : 1<br \/>\ncore id : 0<br \/>\ncpu cores : 1<br \/>\napicid : 0<br \/>\ninitial apicid : 0<br \/>\nfpu : yes<br \/>\nfpu_exception : yes<br \/>\ncpuid level : 13<br \/>\nwp : yes<br \/>\nflags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl pni ssse3 cx16 sse4_1 sse4_2 popcnt aes hypervisor lahf_lm<br \/>\nbogomips : 5187.67<br \/>\nclflush size : 64<br \/>\ncache_alignment : 64<br \/>\naddress sizes : 46 bits physical, 48 bits virtual<br \/>\npower management:<\/p>\n<p>\u53ef\u4ee5\u770b\u51fa\u6d4b\u8bd5\u670d\u52a1\u5668CPU\u4e3a2.6GHz\uff0c\u8981\u6bd4\u6b63\u5f0f\u670d\u52a1\u76842.3GHz\u8981\u9ad8\u4e0d\u5c11\uff0c\u53e6\u5916CPU\u7f13\u5b58\u4e5f\u9ad8\u51fa\u4e861\/3.\u5230\u8fd9\uff0c\u6211\u57fa\u672c\u786e\u5b9a\u4e86\uff0c\u4e0d\u662fPHP\u7684\u95ee\u9898\uff0c\u4e0d\u662fnginx\u7684\u95ee\u9898\uff0c\u662f\u963f\u91cc\u4e91\u4e0d\u540c\u65f6\u95f4\u6bb5\u4e70\u7684ECS\u5e95\u5c42\u914d\u7f6e\u6839\u672c\u4e0d\u4e00\u6837\uff0c\u867d\u7136\u7528\u6237\u8d2d\u4e70\u7684\u65f6\u5019\u90fd\u9009\u7684\u540c\u6837\u7684\u6838\u5fc3\u6570\uff0c\u591a\u6837\u5927\u7684\u78c1\u76d8\uff0c\u4f46\u662f\u5b83\u7684\u786c\u4ef6\u5df2\u7ecf\u5347\u7ea7\u4e86\uff08\u81ea\u6765\u6c34\u4e00\u6ce2\uff1a\u963f\u91cc\u4e91\u8fd8\u662f\u76f8\u5f53\u4e0d\u9519\u7684\uff09\u3002<br \/>\n\u4e00\u5929\u7684\u65f6\u95f4\u5c31\u8017\u8d39\u5728\u8fd9\u513f\u4e86\uff0c\u4e0d\u8fc7\u633a\u5f00\u68ee~~~\u7279\u6b64MARK<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u5929\u6253\u7b97\u597d\u597d\u6d4b\u4e00\u4e0b\u6211\u4eec\u7684\u54d2\u54d2\u76f8\u673aAPP (\u53cb\u60c5\u5e7f\u544a\u4e00\u6ce2,\u4e0b\u8f7d\u94fe\u63a5)\u7684\u540e\u53f0\u6027\u80fd\u3002\u76ee\u524d\u54d2\u54d2\u76f8\u673aAPP\u53ea\u7528\u4e86\u4e00\u53f0\u963f\u91cc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"link","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-28","post","type-post","status-publish","format-link","hentry","category-architecture","post_format-post-format-link"],"_links":{"self":[{"href":"https:\/\/ayonel.malash.net\/index.php\/wp-json\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ayonel.malash.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ayonel.malash.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ayonel.malash.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ayonel.malash.net\/index.php\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":10,"href":"https:\/\/ayonel.malash.net\/index.php\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"predecessor-version":[{"id":88,"href":"https:\/\/ayonel.malash.net\/index.php\/wp-json\/wp\/v2\/posts\/28\/revisions\/88"}],"wp:attachment":[{"href":"https:\/\/ayonel.malash.net\/index.php\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ayonel.malash.net\/index.php\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ayonel.malash.net\/index.php\/wp-json\/wp\/v2\/tags?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}