{"id":2909,"date":"2021-06-11T20:10:09","date_gmt":"2021-06-11T12:10:09","guid":{"rendered":"\/?p=2909"},"modified":"2021-06-16T20:13:53","modified_gmt":"2021-06-16T12:13:53","slug":"5-9-%e7%bd%91%e7%bb%9c%e7%9b%b8%e5%85%b3%e7%ad%94%e7%96%91","status":"publish","type":"post","link":"http:\/\/xinblog.ltd\/?p=2909","title":{"rendered":"5.9 \u7f51\u7edc\u76f8\u5173\u7b54\u7591"},"content":{"rendered":"\n<p>\u6211\u4eec\u8bf4\u4e00\u4e0b\u7f51\u7edc\u6536\u53d1\u7684\u5e38\u89c1\u95ee\u9898<\/p>\n\n\n\n<p>1.\u7f51\u7edc\u6536\u53d1\u8fc7\u7a0b\u4e2d\u7684\u7f13\u51b2\u533a\u7684\u4f4d\u7f6e,\u4e3b\u8981\u662f\u5bf9\u6536\u53d1\u961f\u5217&nbsp;\u7f13\u51b2\u533a\u4f4d\u7f6e\u7684\u7591\u95ee<\/p>\n\n\n\n<p>\u5728Linux\u7f51\u7edc\u4e2d,\u6211\u4eec\u6d89\u53ca\u4e86\u591a\u4e2a\u961f\u5217\u548c\u7f13\u51b2\u533a<\/p>\n\n\n\n<p>\u7f51\u5361\u6536\u53d1\u7f51\u7edc\u5305\u7684\u65f6\u5019,\u901a\u8fc7DMA\u65b9\u5f0f\u8fdb\u884c\u4ea4\u4e92\u7684\u73af\u5f62\u7f13\u51b2\u533a<\/p>\n\n\n\n<p>\u7f51\u5361\u4e2d\u65ad\u5904\u7406\u7a0b\u5e8f\u4e3a\u7f51\u7edc\u5e27\u5206\u914d\u7684,\u5185\u6838\u6570\u636e\u7ed3\u6784 sk_buff&nbsp;\u7f13\u51b2\u533a<\/p>\n\n\n\n<p>\u5e94\u7528\u7a0b\u5e8f\u901a\u8fc7\u5957\u63a5\u5b57\u63a5\u53e3,\u4e0e\u7f51\u7edc\u534f\u8bae\u6808\u4ea4\u4e92\u65f6\u5019\u7684\u5957\u63a5\u5b57\u7f13\u51b2\u533a<\/p>\n\n\n\n<p>\u5bf9\u5e94\u7684\u7f13\u51b2\u533a,\u90fd\u5728\u5185\u6838\u7ba1\u7406\u7684\u5185\u5b58\u4e2d<\/p>\n\n\n\n<p>\u5176\u4e2d\u73af\u5f62\u7f13\u51b2\u533a,\u9700\u8981DMA\u548c\u7f51\u5361\u8fdb\u884c\u4ea4\u4e92,\u7406\u5e94\u5c5e\u4e8e\u7f51\u5361\u9a71\u52a8\u7684\u8303\u56f4<\/p>\n\n\n\n<p>sk_buff&nbsp;\u7f13\u51b2\u533a,\u7ef4\u62a4\u7f51\u7edc\u5e27\u63a5\u53e3\u7684\u53cc\u5411\u94fe\u8868,\u94fe\u8868\u7684\u6bcf\u4e00\u4e2a\u5143\u7d20\u90fd\u662f\u4e00\u4e2a\u7f51\u7edc\u5e27,\u5728\u4e0d\u540c\u7f51\u7edc\u5c42\u4e4b\u95f4\u7684\u4f20\u8f93\u4e2d,\u4f20\u9012\u7684\u662f\u5176\u6307\u9488,\u907f\u514d\u6570\u636e\u590d\u5236<\/p>\n\n\n\n<p>\u5957\u63a5\u5b57\u7f13\u51b2\u533a,\u548c\u5e94\u7528\u7a0b\u5e8f\u76f4\u63a5\u4ea4\u4e92\u7684\u533a\u57df,\u5305\u542b\u53d1\u9001\u548c\u63a5\u6536\u7684\u7f13\u51b2\u533a<\/p>\n\n\n\n<p>\u81f3\u4e8e\u8fd9\u4e9b\u7f13\u51b2\u533a\u548cBuffer Cache\u7684\u5173\u7cfb<\/p>\n\n\n\n<p>Buffer\u662f\u76f4\u63a5\u548c\u5757\u8bbe\u5907\u4ea4\u4e92\u7684,\u5176\u4ed6\u7684\u90fd\u662fCache<\/p>\n\n\n\n<p>sk_buff&nbsp;\u5957\u63a5\u5b57\u8fd9\u4e9b\u5185\u5b58\u5360\u7528,\u90fd\u662f\u7528\u7684slab\u5206\u914d\u5668\u7ba1\u7406\u7684<\/p>\n\n\n\n<p>\u5185\u6838\u534f\u8bae\u6808\u7684\u8fd0\u884c\u65f6\u4ea4\u7531\u90a3\u4e9b\u5185\u6838\u7ebf\u7a0b\u8fdb\u884c\u7684\u5904\u7406\u5462?<\/p>\n\n\n\n<p>\u5305\u542b\u591a\u4e2a\u4e0d\u540c\u7684\u7ebf\u7a0b,\u4f46\u662f\u4e3b\u8981\u7684\u7ebf\u7a0b\u662f\u8f6f\u4e2d\u65ad\u7ebf\u7a0b,\u7531\u4e13\u95e8\u7684\u5185\u6838\u7ebf\u7a0b ksoftirqd,\u6bcf\u4e2aCPU\u4e00\u4e2a,\u6bd4\u59822\u4e2aCPU\u65f6\u5019,\u5c31\u6709ksoftirqd\/0&nbsp;\u548c ksoftirqd\/1\u4e24\u4e2a\u5185\u6838\u7ebf\u7a0b<\/p>\n\n\n\n<p>\u6700\u5927\u8fde\u63a5\u6570\u662f\u4e0d\u662f\u53d7\u9650\u4e8e65535\u4e2a\u7aef\u53e3<\/p>\n\n\n\n<p>\u5148\u8bf4\u7ed3\u8bba,\u5e76\u4e0d\u662f,\u4f46\u4e0d\u662f\u4e4b\u4e2d,\u8fd8\u5206\u4e3a\u4e86\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u7aef,<\/p>\n\n\n\n<p>\u56e0\u4e3a\u5bf9\u4e8e\u7f51\u7edc\u6536\u53d1,\u662f\u7531\u4e00\u4e2a\u4e94\u5143\u7ec4\u6807\u8bc6\u4e3a\u4e00\u4e2a\u8fde\u63a5\u7684<\/p>\n\n\n\n<p>\u6e90IP&nbsp;\u6e90\u7aef\u53e3&nbsp;\u76ee\u7684IP&nbsp;\u76ee\u7684\u7aef\u53e3&nbsp;\u534f\u8bae\u6808<\/p>\n\n\n\n<p>\u5ba2\u6237\u7aef\u6bcf\u6b21\u53d1\u8d77\u8fde\u63a5,\u90fd\u9700\u8981\u4e00\u4e2a\u672c\u5730\u7aef\u53e3\u53bb\u8fde\u63a5\u8fdc\u7aef\u670d\u52a1\u5668,\u6545\u53d7\u7aef\u53e3\u53f7\u7684\u9650\u5236<\/p>\n\n\n\n<p>\u670d\u52a1\u5668\u7aef\u7684\u5e94\u7528\u7a0b\u5e8f\u5219\u662f\u5229\u7528\u7684\u7aef\u53e3\u8fdb\u884c\u7684\u76d1\u542c,\u7b49\u5f85\u5ba2\u6237\u7aef\u7684\u8fde\u63a5<\/p>\n\n\n\n<p>\u4f46\u662f\u5ba2\u6237\u7aef\u7684IP\u548c\u7aef\u53e3\u662f\u53ef\u53d8\u7684,\u5982\u679c\u4e0d\u8003\u8651IP\u5730\u5740\u5206\u7c7b\u548c\u8d44\u6e90\u9650\u5236,\u90a3\u4e48\u670d\u52a1\u5668\u7aef\u7684\u7406\u8bba\u6700\u5927\u8fde\u63a5\u6570,\u53ef\u4ee5\u8fbe\u52302\u768448\u6b21\u65b9<\/p>\n\n\n\n<p>\u4f46\u662f,\u53d7\u9650\u4e8e\u7269\u7406\u8d44\u6e90\u548c\u7f51\u7edc\u534f\u8bae\u6808\u7b49\u95ee\u9898,\u5b9e\u9645\u8fde\u63a5\u53ef\u80fdC10K\u90fd\u8fbe\u4e0d\u5230<\/p>\n\n\n\n<p>\u591a\u4e2a\u5e94\u7528\u7a0b\u5e8f\u5171\u4eab\u4e00\u4e2a\u7aef\u53e3,NAT\u53ef\u4ee5\u6b63\u5e38\u5de5\u4f5c\u5417<\/p>\n\n\n\n<p>\u662f\u53ef\u4ee5\u6b63\u5e38\u5de5\u4f5c\u7684,\u56e0\u4e3a\u6bcf\u4e2a\u8fde\u63a5\u90fd\u6709\u81ea\u5df1\u7684\u4fe1\u606f,\u4e00\u4e2a\u8fde\u63a5\u7684\u6807\u5fd7\u9700\u8981\u4e94\u5143\u7ec4,\u4e94\u5143\u7ec4\u4e0d\u662f\u76f8\u540c\u7684\u8bdd,\u7f51\u7edc\u8fde\u63a5\u5c31\u662f\u6b63\u5e38\u7684<\/p>\n\n\n\n<p>\u4f46\u662f\u5982\u679c\u8fde\u63a5\u6570\u5f88\u5927\u7684\u8bdd<\/p>\n\n\n\n<p>\u53ef\u80fd\u51fa\u73b0,NAT\u540e\u90fd\u662f\u4e00\u4e2aIP,\u8fd9\u5c31\u9700\u8981\u6e90\u7aef\u53e3\u8fdb\u884c\u533a\u5206,\u7aef\u53e3\u53f7\u8fd9\u5c31\u6210\u4e86\u8fde\u63a5\u6570\u7684\u9650\u5236<\/p>\n\n\n\n<p>\u9664\u6b64\u5916,\u5e26\u5bbd\u7b49\u95ee\u9898,\u90fd\u662f\u6f5c\u5728\u7684\u74f6\u9888<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u4eec\u8bf4\u4e00\u4e0b\u7f51\u7edc\u6536\u53d1\u7684\u5e38\u89c1\u95ee\u9898  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"_links":{"self":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/posts\/2909"}],"collection":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2909"}],"version-history":[{"count":0,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/posts\/2909\/revisions"}],"wp:attachment":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2909"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2909"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}