{"id":297083,"date":"2021-01-18T06:20:48","date_gmt":"2021-01-17T22:20:48","guid":{"rendered":"http:\/\/4563.org\/?p=297083"},"modified":"2021-01-18T06:20:48","modified_gmt":"2021-01-17T22:20:48","slug":"%e5%90%8c%e4%b8%80%e6%ae%b5-c%e4%bb%a3%e7%a0%81%e5%9c%a8-aws-aarch64-%e6%9c%ba%e5%99%a8%e4%b8%8b%e5%b1%85%e7%84%b6%e6%9c%89%e8%b6%85%e8%bf%87-40ms-%e7%9a%84%e5%bb%b6%e8%bf%9f%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=297083","title":{"rendered":"\u540c\u4e00\u6bb5 C++\u4ee3\u7801\u5728 AWS aarch64 \u673a\u5668\u4e0b\u5c45\u7136\u6709\u8d85\u8fc7 40ms \u7684\u5ef6\u8fdf\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u540c\u4e00\u6bb5 C++\u4ee3\u7801\u5728 AWS aarch64 \u673a\u5668\u4e0b\u5c45\u7136\u6709\u8d85\u8fc7 40ms \u7684\u5ef6\u8fdf\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dangyuluo <\/span>  <span><i><\/i> 8<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6211\u4eec\u6709\u4e00\u6bb5\u4ee3\u7801\uff0c\u4f1a\u68c0\u6d4b\u67d0\u4e2a\u51fd\u6570\u7684\u8fd0\u884c\u65f6\u95f4\uff0c50ms \u4ee5\u4e0a\u5219\u8ba1\u5931\u8d25\u3002\u8be5\u51fd\u6570\u76ee\u524d\u53ef\u4ee5\u7406\u89e3\u4e3a\u4e00\u4e2a<code>std::this_thread::sleep_for(10ms)<\/code>\u3002\u7406\u8bba\u4e0a\u6709 40ms \u7684 margin \u53ef\u4ee5\u6d6a\u8d39\u3002<\/p>\n<p>\u5728 AWS \u7684 x86_64 \u673a\u5668\u4e0b\uff0c\u6d4b\u8bd5\u6ca1\u6709\u4efb\u4f55\u95ee\u9898\u3002\u4f46\u662f\u5076\u5c14\u5730\uff0c\u5728 AWS <code>a1.4xlarge<\/code>(aarch64)\u673a\u5668\u4e0b\u4f1a\u8d85\u65f6\u3002\u4e5f\u6ca1\u6709\u8d85\u5f88\u591a\uff0c1.66ms \u3002\u4e5f\u5c31\u662f\u8bf4\u4e00\u4e2a\u672c\u5e94\u8be5\u6267\u884c 10ms \u7684\u51fd\u6570 50ms \u90fd\u6ca1\u6709\u6267\u884c\u5b8c\u3002<\/p>\n<p>\u6211\u77e5\u9053 aarch64 \u7cfb\u7edf\u7684\u6027\u80fd\u786e\u5b9e\u4e0d\u5982 x86_64\uff0c\u4f46\u662f\u8fd9\u4e48\u5927\u7684\u5dee\u8ddd\u662f\u5408\u7406\u7684\u4e48\uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>17<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4988380\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dorafmon <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u597d\u5947\uff0c\u8e72\u4e00\u4e2a\u89e3\u91ca\u3002\u8fd9\u4e2a\u51fd\u6570\u6ca1\u6709\u505a\u4efb\u4f55 io \u4e48\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4988381\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : dangyuluo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @dorafmon \u6ca1\u6709\u505a\u4efb\u4f55 io\uff0c\u5355\u7eaf\u7684 sleep_for                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4988382\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cz5424 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u662f\u4e0d\u662f\u9ad8\u5cf0\u671f\u5171\u4eab cpu \u8ba1\u7b97\u5f71\u54cd\u4e86?\u6211\u6ca1\u7528\u8fc7 aws \u4e71\u8bf4\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4988383\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : dangyuluo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @cz5424 \u6709\u8fd9\u79cd\u53ef\u80fd\uff0c\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u786e\u5b9e\u4e5f\u4f1a\u8dd1\u5176\u4ed6\u7684 test \u3002\u4f46\u662f\u6211\u6ca1\u60f3\u5230\u5f71\u54cd\u4f1a\u8fd9\u4e48\u5927                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4988384\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dinghao188 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u600e\u4e48\u68c0\u6d4b\u7684\uff0c\u80fd\u7b80\u5355\u4ecb\u7ecd\u4e0b\u5417                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4988385\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Mohanson <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8bd5\u8bd5\u4e0d\u8981\u8dd1\u4f60\u81ea\u5df1\u7684\u51fd\u6570\uff0c\u53ef\u4ee5\u5199\u4e2a\u6590\u6ce2\u90a3\u5951\u51fd\u6570\u5728\u4e24\u4e2a\u5e73\u53f0\u4e0a\u8dd1\u8dd1\u5c31\u77e5\u9053\u6027\u80fd\u591a\u5c11\u6bd4\u591a\u5c11\u4e86\uff0c\u4e91\u4e0a\u9762\u7684\u6027\u80fd\u90fd\u5f88\u7384\u5b66\uff0c\u6211\u524d\u6bb5\u65f6\u95f4\u540c\u53f0\u673a\u5668\u8dd1\u7eaf\u8ba1\u7b97\u7684\u4eff\u771f\u5668\u6d4b\u8bd5\u4ee3\u7801\uff0c\u4e00\u4f1a 6 \u5206\u949f\u4e00\u4f1a 4 \u5206\u949f\uff0c\u5988\u86cb\uff0c\u5f53\u65f6\u6709\u4eba\u7ed9\u6211\u63d0\u7684 issue \u6211\u4f18\u5316\u5b8c\u4ee3\u7801\uff0c\u5c3d\u7136\u65e0\u6cd5\u786e\u5207\u77e5\u9053\u8fd9\u4e2a\u4f18\u5316\u5230\u5e95\u6709\u6ca1\u6709\u7528\u2026                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4988386\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Mohanson <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u534a\u4e2a\u6708\u524d\u7684 issue\uff0c\u6700\u540e\u4ee3\u7801\u62c9\u81ea\u5df1\u7684\u6e38\u620f\u673a\u4e0a\u8dd1\u6d4b\u8bd5\u624d\u6d4b\u51fa\u5feb\u4e86 10 \u556a<br \/>https:\/\/github.com\/mohanson\/pywasm\/issues\/42#issuecomment-753610944                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4988387\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : dangyuluo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @dinghao188 \u5728\u5f00\u59cb\u8fd0\u884c\u51fd\u6570\u524d\u83b7\u53d6\u65f6\u95f4\u6233\uff08\u7eb3\u79d2\uff09\uff0c\u8fd0\u884c\u51fd\u6570\u540e\u518d\u83b7\u53d6\u4e00\u6b21\u3002\u76f8\u51cf\u540e\u5224\u65ad\u3002<\/p>\n<p>@Mohanson \u597d\u7684\uff0c\u6211\u518d\u601d\u8003\u4e00\u4e0b\u3002\u8c22\u8c22                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4988388\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : opengps <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u591a\u5f00\u51e0\u4e2a\u5b9e\u4f8b\u518d\u8bd5\u4e0b\uff0c\u4e91\u96c6\u7fa4\u91cc\u7684\u5b9e\u9645\u7269\u7406\u8d44\u6e90\u4f4d\u7f6e\u6bcf\u6b21\u65b0\u8d2d\u90fd\u4f1a\u6709\u53d8\u52a8\uff0c\u8bf4\u4e0d\u5b9a\u90a3\u6b21\u7528\u7684\u5b9e\u4f8b\u7f51\u7edc\u9014\u5f84\u66f4\u77ed                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4988389\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dorafmon <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u4e0d\u660e\u767d\u7684\u70b9\u5728\u4e8e\u8981\u662f\u53ea\u662f sleep_for \u7684\u8bdd\uff0c\u90a3\u4e48\u5e94\u8be5\u4e24\u4e2a\u673a\u5668\u4e0a\u5e94\u8be5\u90fd\u53ea\u7761\u4e86 10ms \u4e3a\u4ec0\u4e48\u4f1a\u6709\u4e0d\u4e00\u6837\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4988390\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : allAboutDbmss <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6ca1\u6709\u4efb\u4f55\u601d\u8def<br \/>\u53ef\u4ee5\u5148\u627e\u4e00\u53f0\u672c\u5730\u7684 aarch64 arm \u6765\u8dd1\u4e00\u4e0b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4988391\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mepwang <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4ee3\u7801\u91cc\u53d6 os \u7cbe\u786e\u5230\u7eb3\u79d2\u7684\u65f6\u95f4\u6233\uff0c\u770b\u770b\u662f\u4e0d\u662f sleep_for \u8c03\u7528\u4e0d\u7cbe\u786e\u3002\u6211\u8bb0\u5f97\u4ee5\u524d\u7684 sleep \u8c03\u7528\u8bef\u5dee\u5f88\u5927\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4988392\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : tianshilei1992 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Blocks the execution of the current thread for at least the specified sleep_duration.<br \/>This function may block for longer than sleep_duration due to scheduling or resource contention delays.<br \/>The standard recommends that a steady clock is used to measure the duration. If an implementation uses a system clock instead, the wait time may also be sensitive to clock adjustments.<\/p>\n<p>https:\/\/en.cppreference.com\/w\/cpp\/thread\/sleep_for                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4988393\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : dangyuluo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @tianshilei1992 \u6211\u4e5f\u6709\u731c\u6d4b\u662f\u8c03\u5ea6\u5668\u7684\u95ee\u9898\uff0c\u4f46\u662f\u60ca\u8bb6\u4e8e\u8c03\u5ea6\u5668\u5c45\u7136 40ms \u8fd8\u4e0d\u4f1a\u5206\u914d\u65f6\u95f4\u7247\u7ed9\u5f53\u524d\u4efb\u52a1                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4988394\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wang93wei <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5982\u679c\u9047\u5230\u8fd9\u4e2a\u95ee\u9898\uff0c\uff0c\uff0c\u4e3a\u4ec0\u4e48\u4e0d\u63d0\u5de5\u5355\u95ee\u4e00\u4e0b\u5462\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4988395\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : dangyuluo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @wang93wei \u56e0\u4e3a\u6211\u53f8\u4e0d\u662f AWS \u7684\u4ed8\u8d39\u652f\u63f4\u5ba2\u6237\uff0c\u800c\u8981\u6210\u4e3a\u4ed8\u8d39\u652f\u63f4\u5ba2\u6237\u6bcf\u4e2a\u6708\u7684\u8d26\u5355\u4f1a\u589e\u957f 10%                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4988396\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 52coder <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u672c\u5730\u8dd1\u9047\u5230\u8fc7\u7c7b\u4f3c\u7684\u95ee\u9898\u5417\uff1f\u6027\u80fd\u4e0a aarch \u4e0d\u81f3\u4e8e\u8fd9\u4e48\u5dee\uff0c\u4e3b\u6709\u7ed3\u8bba\u4e86\u9ebb\u70e6\u66f4\u65b0\u4e0b\uff0c\u6700\u8fd1\u4e5f\u5728\u79fb\u690d\u7a0b\u5e8f\u5230 aarch \u548c mips                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u540c\u4e00\u6bb5 C++\u4ee3\u7801\u5728 AWS aa&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/297083"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=297083"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/297083\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=297083"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=297083"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=297083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}