{"id":135861,"date":"2020-07-21T16:14:49","date_gmt":"2020-07-21T08:14:49","guid":{"rendered":"http:\/\/4563.org\/?p=135861"},"modified":"2020-07-21T16:14:49","modified_gmt":"2020-07-21T08:14:49","slug":"%e4%b8%8d%e6%87%82%e5%b0%b1%e9%97%ae%ef%bc%8c-docker-%e5%a4%a7%e7%a5%9e%e8%af%b7%e8%bf%9b%ef%bc%81","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=135861","title":{"rendered":"\u4e0d\u61c2\u5c31\u95ee\uff0c Docker \u5927\u795e\u8bf7\u8fdb\uff01"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u4e0d\u61c2\u5c31\u95ee\uff0c Docker \u5927\u795e\u8bf7\u8fdb\uff01               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hengo <\/span>  <span><i><\/i> 11<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<h1>\u5173\u4e8e Docker \u7684 CPU \u5360\u7528\u7387\u7684\u95ee\u9898<\/h1>\n<p> <\/p>\n<blockquote>\n<p>\u4e8b\u60c5\u662f\u8fd9\u6837\u7684\u8fd9\u8fb9\u56e0\u4e3a&#8217;Oracle&#8217;\u6570\u636e\u91cf\u6bd4\u8f83\u5927\uff0c\u51e0\u5341\u4e07\u7684\u6570\u636e\uff0c\u7136\u540e\u7528\u7684\u6279\u91cf\u4ece\u6570\u636e\u5e93 A -&gt; \u6570\u636e\u5e93 B\uff0c\u5f02\u6b65\u591a\u7ebf\u7a0b\u5faa\u73af\u6bcf\u6b21\u63d2\u5165 1000 \u6761\u6570\u636e\uff0c\u7a0b\u5e8f\u4ee3\u7801\u4f1a\u5361\u6b7b\uff0c\u6bcf\u6b21\u53ea\u80fd\u5faa\u73af\u63d2\u5165 100 \u6761\u6570\u636e\uff08\u8fd9\u6837\u4e0d\u4f1a\u624d\u4e0d\u4f1a\u5361\u6b7b\uff09\uff0c\u4f7f\u7528&#8217;docker stats&#8217;\u67e5\u770b\u4e86\u4e00\u4e0b Oracle \u7684 CPU \u5360\u7528\u7387\uff0c\u5df2\u7ecf\u8fbe\u5230\u4e86&#8217;100%&#8217;\u3002\u4f46\u662f\u5728\u4e3b\u673a\u4e0a\u4f7f\u7528&#8217;top&#8217;\u547d\u4ee4\uff0cCPU \u7684\u5360\u7528\u7387\u624d&#8217;25%&#8217;\u5de6\u53f3\u3002<\/p>\n<\/blockquote>\n<ol>\n<li>\u7167\u7406\u6765\u8bf4\uff0cOracle \u4e00\u6b21\u6027\u63d2\u5165\u51e0\u5343\u6761\u6570\u636e\uff0c\u90fd\u4e0d\u5e94\u8be5\u662f\u8fd9\u6837\u7684\u60c5\u51b5\u3002\u800c\u76ee\u524d\u63d2\u5165 1000 \u6761\u5c31\u5361\u4e86\u3002<\/li>\n<li>\u6211\u770b\u5230\u535a\u5ba2\u91cc\u9762\uff0c\u4e00\u822c\u90fd\u662f\u53bb\u8c03\u6574\u591a\u4e2a CPU \u7684\u4f7f\u7528\u6743\u91cd\uff0c\u5bf9\u4e8e\u6211\u8fd9\u79cd\u60c5\u51b5\u600e\u4e48\u53bb\u8c03\u6574 Docker \u7684 CPU \u4f7f\u7528\u7387\uff0c\u624d\u80fd\u8ba9\u5b83\u5360\u6709\u670d\u52a1\u5668\u4e3b\u673a\u7684 CPU \u7684\u5168\u90e8\u6027\u80fd\uff1f<\/li>\n<\/ol>\n<p>\u4e0b\u9762\u9644\u4e0a\uff1a\u4e3b\u673a\u7684 TOP \u622a\u56fe\u548c Docker \u5bb9\u5668\u7684 CPU \u5360\u7528\u622a\u56fe <img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/07\/20200722_5f17821f6fb38.jpg\" alt=\"\u4e0d\u61c2\u5c31\u95ee\uff0c Docker \u5927\u795e\u8bf7\u8fdb\uff01\" \/> <img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/07\/20200722_5f17822a3ff7f.png\" alt=\"\u4e0d\u61c2\u5c31\u95ee\uff0c Docker \u5927\u795e\u8bf7\u8fdb\uff01\" \/><\/p>\n<p>\u53e6\u5916\uff0c\u76f4\u63a5\u7528 Oracle GUI \u5de5\u5177\u76f4\u63a5\u63d2\u5165\u4e00\u4e07\u6761\uff0cGUI \u5de5\u5177\u4e5f\u4f1a\u5361\uff0c\u800c\u4e14 Docker stats \u67e5\u770b Oracle \u7684 CPU \u5360\u7528\u7387\u4e5f\u8fbe\u5230\u4e86 100%<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>11<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"2438330\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Jirajine <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             docker \u9ed8\u8ba4\u6ca1\u6709\u6027\u80fd\u9650\u5236<br \/>https:\/\/docs.docker.com\/config\/containers\/resource_constraints\/                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2438331\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : GM <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u662f\u4e0d\u662f\u7528\u4e86\u9ed8\u8ba4\u7684\u5b58\u50a8\uff0c\u90a3\u4e2a\u4e1c\u897f IO \u6027\u80fd\u5f88\u5dee\uff0c\u4f1a\u5bfc\u81f4\u6240\u6709\u8bfb\u5199\u78c1\u76d8\u7684\u64cd\u4f5c\u5f88\u6162\uff0c\u6bd4\u5982\u5f80\u6570\u636e\u5e93\u91cc\u63d2\u6570\u636e\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2438332\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : hengo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Jirajine \u55ef\uff0c\u90a3\u6211\u8fd9\u4e2a\u5927\u6982\u662f\u4ec0\u4e48\u539f\u56e0\u5462\uff1f\u662f\u56e0\u4e3a\u5b89\u88c5\u7684 Oracle \u5bb9\u5668\u6709\u95ee\u9898\u5417\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2438333\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ashong <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5b58\u50a8\u4f4d\u7f6e\u4e0d\u4f1a\u5728\u5bb9\u5668\u5185\u5427                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2438334\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Jirajine <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @hengo \u6240\u4ee5\u9650\u5236\uff08\u5982\u679c\u6709\uff09\u662f\u7528\u6237\u52a0\u7684\uff0c\u4f60 inpsect \u770b\u4e00\u4e0b\u554a\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2438335\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ypcs03 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u80fd\u8ddf\u4f60 cpu \u591a\u6838\u6709\u5173                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2438336\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : hengo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u51b3\u5b9a\u5b89\u88c5\u4e00\u4e2a Linux \u672c\u5730\u7684 Oracle \u8bd5\u8bd5\uff0c\u73b0\u5728\u53ea\u80fd\u901a\u8fc7\u8fd9\u4e2a\u8fdb\u884c\u6392\u67e5\u5230\u5e95\u662f\u4ec0\u4e48\u539f\u56e0\u4e86\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2438337\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hyperbin <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6570\u636e\u5e93\u4e0d\u9002\u5408\u5bb9\u5668\u5316\uff0c\u6709\u72b6\u6001\u7684\u670d\u52a1\u90fd\u4e0d\u9002\u5408                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2438338\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mritd <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6240\u4ee5\u4f60\u6839\u672c\u6ca1\u8bf4\u4f60\u7528\u7684\u4ec0\u4e48\u955c\u50cf\uff0c\u636e\u6211\u6240\u77e5 oracle \u5b98\u65b9\u5728 docker hub \u4e0a\u7684\u662f\u7ed9\u4f60\u6d4b\u8bd5\u5f97\uff0c\u672c\u8eab\u5c31\u6709\u9650\u5236                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2438339\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : hengo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @mritd \u73b0\u5728\u521d\u6b65\u6000\u7591\uff0c\u6211\u7528\u7684 mybatis \u6279\u91cf\u63d2\u5165\uff0c\u8fd9\u6548\u7387\u5f88\u4f4e\uff0c\u5bb9\u6613\u628a CPU \u62c9\u6ee1\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2438340\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dolphintwo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u9ed8\u9ed8\u60f3\u7ea0\u6b63\u4f60\u4e00\u4e0b\uff0c\u770b\u4f60\u56db\u6838\u7684\u673a\u5668\uff0c\u5176\u5b9e docker stats \u53ef\u4ee5\u770b\u5230\u7684 cpu \u6700\u5927\u503c\u5e94\u8be5\u662f 400%\uff0c\u548c top \u8ba1\u7b97\u65b9\u6cd5\u4e0d\u4e00\u81f4\uff0c\u6240\u4ee5\u4e24\u8fb9\u663e\u793a\u4e00\u6837\u3002so&#8230;.\u74f6\u9888\u4e0d\u5728 cpu\uff0c\u4e5f\u4e0d\u5b58\u5728 limit\uff0c\u9ed8\u8ba4\u90fd\u662f\u653e\u5f00\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0d\u61c2\u5c31\u95ee\uff0c Docker \u5927\u795e\u8bf7\u8fdb&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\/135861"}],"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=135861"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/135861\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=135861"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=135861"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=135861"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}