{"id":97823,"date":"2026-08-30T10:16:58","date_gmt":"2026-08-30T02:16:58","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/97823.html"},"modified":"2026-08-30T10:16:58","modified_gmt":"2026-08-30T02:16:58","slug":"%e4%bd%a0%e7%9a%84%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%81%9a%e8%bf%87%e4%bd%93%e6%a3%80%e4%b9%88%ef%bc%9f%e4%b8%80%e4%bb%bd%e7%9c%9f%e5%ae%9e%e7%9a%84-centos-%e9%ab%98%e5%b9%b6%e5%8f%91%e6%9c%8d%e5%8a%a1","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/97823.html","title":{"rendered":"\u4f60\u7684\u670d\u52a1\u5668\u505a\u8fc7\u4f53\u68c0\u4e48\uff1f\u4e00\u4efd\u771f\u5b9e\u7684 CentOS \u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u4f53\u68c0\u4e0e\u4f18\u5316\u5b9e\u5f55"},"content":{"rendered":"<h2>\u4f60\u7684\u670d\u52a1\u5668\u505a\u8fc7\u4f53\u68c0\u4e48&#xff1f;\u4e00\u4efd\u771f\u5b9e\u7684 CentOS \u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u4f53\u68c0\u4e0e\u4f18\u5316\u5b9e\u5f55<\/h2>\n<p>\u670d\u52a1\u5668\u8dd1\u8d77\u6765\u4e4b\u540e&#xff0c;\u4f60\u591a\u4e45\u4f1a\u53bb\u770b\u4e00\u6b21\u5b83&#xff1f;<\/p>\n<p>\u5f88\u591a\u4eba\u7684\u7b54\u6848\u53ef\u80fd\u662f&#xff1a;\u53ea\u8981\u670d\u52a1\u6ca1\u6302&#xff0c;\u6211\u5c31\u4e0d\u770b\u3002<\/p>\n<p>\u6211\u4ee5\u524d\u4e5f\u5dee\u4e0d\u591a\u3002CPU \u6ca1\u7206\u3001\u5185\u5b58\u6ca1 OOM\u3001\u78c1\u76d8\u8fd8\u6709\u7a7a\u95f4\u3001\u63a5\u53e3\u80fd\u6b63\u5e38\u8bbf\u95ee&#xff0c;\u5c31\u89c9\u5f97\u670d\u52a1\u5668\u72b6\u6001\u5e94\u8be5\u6ca1\u4ec0\u4e48\u95ee\u9898\u3002<\/p>\n<p>\u76f4\u5230\u6700\u8fd1\u5bf9\u51e0\u53f0\u7ebf\u4e0a CentOS \u670d\u52a1\u5668\u505a\u4e86\u4e00\u6b21\u6bd4\u8f83\u5b8c\u6574\u7684\u201c\u4f53\u68c0\u201d&#xff0c;\u6211\u624d\u53d1\u73b0\u4e00\u4e2a\u5f88\u5bb9\u6613\u88ab\u5ffd\u7565\u7684\u95ee\u9898&#xff1a;<\/p>\n<p>\u670d\u52a1\u5668\u73b0\u5728\u6b63\u5e38&#xff0c;\u4e0d\u4ee3\u8868\u5b83\u5728\u4e1a\u52a1\u9ad8\u5cf0\u671f\u4e5f\u6b63\u5e38\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260830021655-6a9392977f46e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u6709\u4e00\u53f0\u670d\u52a1\u5668\u68c0\u67e5\u65f6 CPU Load \u53ea\u6709 0.01 \u5de6\u53f3&#xff0c;TCP \u72b6\u6001\u770b\u8d77\u6765\u4e5f\u5f88\u5e73\u7a33&#xff0c;\u4f46\u7ee7\u7eed\u5f80\u5e95\u5c42\u7ffb\u7edf\u8ba1\u6570\u636e&#xff0c;\u5374\u53d1\u73b0\u7cfb\u7edf\u5386\u53f2\u4e0a\u5df2\u7ecf\u51fa\u73b0\u4e86\u63a5\u8fd1 30 \u4e07\u6b21 SYN \u4e22\u5f03&#xff0c;\u5185\u6838\u751a\u81f3\u660e\u786e\u8bb0\u5f55\u8fc7&#xff1a;<\/p>\n<p>TCP: request_sock_TCP: Possible SYN flooding on port 80.<br \/>\nSending cookies. Check SNMP counters.<\/p>\n<p>\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u670d\u52a1\u5668\u8868\u9762\u98ce\u5e73\u6d6a\u9759&#xff0c;\u5e95\u5c42\u5176\u5b9e\u65e9\u5c31\u201c\u54b3\u55fd\u201d\u8fc7\u5f88\u591a\u6b21\u4e86\u3002<\/p>\n<p>\u8fd9\u7bc7\u6587\u7ae0\u5c31\u62ff\u8fd9\u6b21\u771f\u5b9e\u6392\u67e5\u8fc7\u7a0b&#xff0c;\u804a\u804a\u4e00\u53f0 Linux \u670d\u52a1\u5668\u5230\u5e95\u5e94\u8be5\u600e\u4e48\u4f53\u68c0&#xff0c;\u4ee5\u53ca\u53d1\u73b0\u95ee\u9898\u4e4b\u540e\u54ea\u4e9b\u53c2\u6570\u503c\u5f97\u6539&#xff0c;\u54ea\u4e9b\u53c2\u6570\u4e0d\u8981\u8ddf\u7740\u7f51\u4e0a\u6240\u8c13\u7684\u201c\u767e\u4e07\u5e76\u53d1\u6a21\u677f\u201d\u4e71\u8c03\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u670d\u52a1\u5668\u4f53\u68c0&#xff0c;\u5230\u5e95\u5e94\u8be5\u68c0\u67e5\u4ec0\u4e48&#xff1f;<\/h3>\n<p>\u5e73\u65f6\u5927\u5bb6\u767b\u5f55\u670d\u52a1\u5668&#xff0c;\u6700\u5e38\u6267\u884c\u7684\u5927\u6982\u5c31\u662f&#xff1a;<\/p>\n<p><span class=\"token function\">top<\/span><br \/>\n<span class=\"token function\">free<\/span> <span class=\"token parameter variable\">-h<\/span><br \/>\n<span class=\"token function\">df<\/span> <span class=\"token parameter variable\">-h<\/span><\/p>\n<p>\u8fd9\u4e09\u4e2a\u547d\u4ee4\u5f53\u7136\u91cd\u8981&#xff0c;\u4f46\u5982\u679c\u670d\u52a1\u5668\u627f\u62c5 Web API\u3001Nginx\u3001Java\u3001PHP\u3001Redis\u3001MySQL \u7b49\u670d\u52a1&#xff0c;\u4ec5\u770b\u8fd9\u4e9b\u8fdc\u8fdc\u4e0d\u591f\u3002<\/p>\n<p>\u6211\u8fd9\u6b21\u628a\u68c0\u67e5\u5185\u5bb9\u5927\u81f4\u5206\u6210\u4e86\u516d\u7c7b&#xff1a;<\/p>\n<li>\u6587\u4ef6\u53e5\u67c4\u548c\u8fdb\u7a0b\u7ebf\u7a0b\u9650\u5236<\/li>\n<li>TCP \u5185\u6838\u53c2\u6570<\/li>\n<li>\u5f53\u524d TCP \u8fde\u63a5\u72b6\u6001<\/li>\n<li>\u7f51\u5361\u548c\u7f51\u7edc\u6d41\u91cf<\/li>\n<li>CPU\u3001\u5185\u5b58\u3001\u8fdb\u7a0b\u8d44\u6e90<\/li>\n<li>TCP \u4e22\u5305\u3001Overflow\u3001Reset\u3001OOM \u7b49\u5386\u53f2\u5f02\u5e38<\/li>\n<p>\u771f\u6b63\u6709\u610f\u601d\u7684\u5f80\u5f80\u662f\u6700\u540e\u4e00\u9879\u3002<\/p>\n<p>\u56e0\u4e3a CPU \u548c\u5185\u5b58\u544a\u8bc9\u4f60\u7684\u66f4\u591a\u662f&#xff1a;<\/p>\n<p>\u670d\u52a1\u5668\u73b0\u5728\u600e\u4e48\u6837\u3002<\/p>\n<p>\u800c netstat -s\u3001dmesg \u8fd9\u4e9b\u6570\u636e\u544a\u8bc9\u4f60\u7684\u5219\u53ef\u80fd\u662f&#xff1a;<\/p>\n<p>\u670d\u52a1\u5668\u8fc7\u53bb\u5230\u5e95\u53d1\u751f\u8fc7\u4ec0\u4e48\u3002<\/p>\n<p>\u8fd9\u4e24\u4ef6\u4e8b\u5dee\u522b\u5f88\u5927\u3002<\/p>\n<hr \/>\n<h3>\u4e8c\u3001\u7b2c\u4e00\u773c\u770b&#xff0c;\u8fd9\u53f0\u670d\u52a1\u5668\u751a\u81f3\u975e\u5e38\u201c\u5065\u5eb7\u201d<\/h3>\n<p>\u8fd9\u53f0\u673a\u5668\u914d\u7f6e\u4e0d\u7b97\u7279\u522b\u9ad8&#xff1a;<\/p>\n<p>CentOS 7<br \/>\nKernel 3.10<br \/>\n\u5185\u5b58&#xff1a;7.4G<br \/>\nSwap&#xff1a;0<\/p>\n<p>\u68c0\u67e5\u65f6 CPU Load&#xff1a;<\/p>\n<p>load average: 0.01, 0.04, 0.08<\/p>\n<p>\u8fd9\u662f\u4ec0\u4e48\u6982\u5ff5&#xff1f;<\/p>\n<p>\u57fa\u672c\u6ca1\u4ec0\u4e48 CPU \u538b\u529b\u3002<\/p>\n<p>\u5185\u5b58\u60c5\u51b5&#xff1a;<\/p>\n<p>total        7.4G<br \/>\nused         5.5G<br \/>\navailable    1.6G<\/p>\n<p>\u867d\u7136\u5185\u5b58\u4f59\u91cf\u4e0d\u7b97\u7279\u522b\u5bbd\u88d5&#xff0c;\u4f46\u4e5f\u6ca1\u6709\u53d1\u751f OOM\u3002<\/p>\n<p>\u6587\u4ef6\u53e5\u67c4&#xff1a;<\/p>\n<p>ulimit -n &#061; 65535<br \/>\nfs.file-max &#061; 759020<br \/>\nfile-nr &#061; 3232<\/p>\n<p>\u7cfb\u7edf\u6700\u591a\u5141\u8bb8 75 \u4e07\u5de6\u53f3\u6587\u4ef6\u53e5\u67c4&#xff0c;\u5b9e\u9645\u624d\u7528\u4e86\u4e09\u5343\u591a\u4e2a&#xff0c;\u8fd9\u91cc\u540c\u6837\u6ca1\u6709\u74f6\u9888\u3002<\/p>\n<p>\u5982\u679c\u68c0\u67e5\u5230\u8fd9\u91cc\u5c31\u7ed3\u675f&#xff0c;\u5f88\u5bb9\u6613\u5f97\u51fa\u4e00\u4e2a\u7ed3\u8bba&#xff1a;<\/p>\n<p>\u670d\u52a1\u5668\u633a\u5065\u5eb7&#xff0c;\u4e0d\u9700\u8981\u4f18\u5316\u3002<\/p>\n<p>\u4f46\u7ee7\u7eed\u5f80 TCP \u5c42\u770b&#xff0c;\u60c5\u51b5\u5c31\u5b8c\u5168\u4e0d\u4e00\u6837\u4e86\u3002<\/p>\n<hr \/>\n<h3>\u4e09\u3001\u771f\u6b63\u7684\u95ee\u9898\u85cf\u5728 TCP \u5386\u53f2\u7edf\u8ba1\u91cc<\/h3>\n<p>\u5f53\u65f6\u8fd9\u53f0\u670d\u52a1\u5668\u5b9e\u65f6 TCP \u72b6\u6001\u5927\u6982\u662f&#xff1a;<\/p>\n<p>TCP: 1076<br \/>\nESTABLISHED: 1046<br \/>\nTIME_WAIT: 8<br \/>\nCLOSE_WAIT: 7<\/p>\n<p>\u4e00\u5343\u591a\u4e2a ESTABLISHED \u5bf9\u7ebf\u4e0a\u670d\u52a1\u5668\u5e76\u4e0d\u662f\u4ec0\u4e48\u7279\u522b\u79bb\u8c31\u7684\u6570\u636e\u3002<\/p>\n<p>TIME_WAIT \u53ea\u6709\u4e2a\u4f4d\u6570&#xff0c;\u4e5f\u5b8c\u5168\u6b63\u5e38\u3002<\/p>\n<p>\u4f46\u7ee7\u7eed\u6267\u884c&#xff1a;<\/p>\n<p><span class=\"token function\">netstat<\/span> <span class=\"token parameter variable\">-s<\/span><\/p>\n<p>\u7136\u540e\u7b5b\u9009 TCP \u5f02\u5e38&#xff1a;<\/p>\n<p><span class=\"token function\">netstat<\/span> <span class=\"token parameter variable\">-s<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-iE<\/span> <span class=\"token string\">&#034;overflow|drop|reset|listen&#034;<\/span><\/p>\n<p>\u7ed3\u679c\u5c31\u6bd4\u8f83\u6709\u610f\u601d\u4e86&#xff1a;<\/p>\n<p>743705 connection resets received<br \/>\n4984066 resets sent<br \/>\n367106 resets received for embryonic SYN_RECV sockets<br \/>\n299729 SYNs to LISTEN sockets dropped<br \/>\n709862 connections reset due to early user close<br \/>\nTCPBacklogDrop: 2<\/p>\n<p>\u5176\u4e2d\u6700\u503c\u5f97\u5173\u6ce8\u7684\u662f&#xff1a;<\/p>\n<p>299729 SYNs to LISTEN sockets dropped<\/p>\n<p>\u63a5\u8fd1 30 \u4e07\u6b21\u3002<\/p>\n<p>\u518d\u770b dmesg&#xff0c;\u76f4\u63a5\u627e\u5230\u4e86&#xff1a;<\/p>\n<p>TCP: request_sock_TCP:<br \/>\nPossible SYN flooding on port 80.<br \/>\nSending cookies.<br \/>\nCheck SNMP counters.<\/p>\n<p>\u8fd9\u4e0b\u95ee\u9898\u5c31\u5f88\u660e\u786e\u4e86\u3002<\/p>\n<p>\u8fd9\u53f0\u670d\u52a1\u5668\u867d\u7136\u68c0\u67e5\u7684\u65f6\u5019\u5f88\u95f2&#xff0c;\u4f46\u5386\u53f2\u4e1a\u52a1\u9ad8\u5cf0\u671f\u95f4&#xff0c;80 \u7aef\u53e3\u7684\u65b0 TCP \u8fde\u63a5\u66fe\u7ecf\u7ed9\u670d\u52a1\u5668\u9020\u6210\u8fc7\u660e\u663e\u538b\u529b\u3002<\/p>\n<p>\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48\u6211\u73b0\u5728\u8d8a\u6765\u8d8a\u89c9\u5f97&#xff1a;<\/p>\n<p>\u670d\u52a1\u5668\u4f53\u68c0\u4e0d\u80fd\u53ea\u770b\u5b9e\u65f6 CPU \u548c\u5185\u5b58\u3002<\/p>\n<p>\u5f88\u591a\u95ee\u9898\u90fd\u662f\u77ac\u65f6\u53d1\u751f\u7684\u3002\u4f60\u665a\u4e0a\u516b\u70b9\u68c0\u67e5\u670d\u52a1\u5668\u53ef\u80fd\u4e00\u5207\u6b63\u5e38&#xff0c;\u4f46\u4e0b\u5348\u4e24\u70b9\u4e1a\u52a1\u9ad8\u5cf0\u7684\u65f6\u5019&#xff0c;TCP \u961f\u5217\u53ef\u80fd\u5df2\u7ecf\u7206\u8fc7\u4e00\u6b21\u4e86\u3002<\/p>\n<hr \/>\n<h2>\u56db\u3001\u7ee7\u7eed\u5f80\u4e0b\u67e5&#xff0c;\u95ee\u9898\u5c31\u627e\u5230\u6839\u4e86<\/h2>\n<p>\u68c0\u67e5\u670d\u52a1\u5668 TCP \u53c2\u6570&#xff1a;<\/p>\n<p><span class=\"token function\">sysctl<\/span> net.core.somaxconn<br \/>\n<span class=\"token function\">sysctl<\/span> net.ipv4.tcp_max_syn_backlog<br \/>\n<span class=\"token function\">sysctl<\/span> net.core.netdev_max_backlog<\/p>\n<p>\u7ed3\u679c&#xff1a;<\/p>\n<p>net.core.somaxconn &#061; 1024<br \/>\nnet.ipv4.tcp_max_syn_backlog &#061; 1024<br \/>\nnet.core.netdev_max_backlog &#061; 1000<\/p>\n<p>\u8fd9\u4e9b\u53c2\u6570\u7b80\u5355\u7406\u89e3&#xff1a;<\/p>\n<h4>tcp_max_syn_backlog<\/h4>\n<p>\u5ba2\u6237\u7aef\u8bbf\u95ee&#xff1a;<\/p>\n<p>\u5ba2\u6237\u7aef<br \/>\n   \u2193 SYN<br \/>\n\u670d\u52a1\u5668<br \/>\n   \u2193<br \/>\nSYN_RECV<br \/>\n   \u2193 ACK<br \/>\nESTABLISHED<\/p>\n<p>\u4e09\u6b21\u63e1\u624b\u8fd8\u6ca1\u6709\u5b8c\u6210\u7684\u65f6\u5019&#xff0c;\u8fde\u63a5\u9700\u8981\u6682\u5b58\u5728 SYN \u961f\u5217\u3002<\/p>\n<p>\u8fd9\u4e2a\u961f\u5217\u592a\u5c0f&#xff0c;\u800c\u77ac\u95f4\u53c8\u6765\u4e86\u5927\u91cf\u65b0\u8fde\u63a5&#xff0c;\u5c31\u53ef\u80fd\u51fa\u73b0&#xff1a;<\/p>\n<p>SYNs to LISTEN sockets dropped<\/p>\n<p>\u8fd9\u6b21\u670d\u52a1\u5668\u6b63\u597d\u5df2\u7ecf\u7559\u4e0b\u4e86\u5927\u91cf\u5386\u53f2\u8bb0\u5f55\u3002<\/p>\n<h4>somaxconn<\/h4>\n<p>somaxconn \u63a7\u5236\u7684\u662f\u5e94\u7528 listen() \u961f\u5217\u80fd\u591f\u4f7f\u7528\u7684\u7cfb\u7edf\u7ea7\u4e0a\u9650\u3002<\/p>\n<p>\u670d\u52a1\u5668\u539f\u6765&#xff1a;<\/p>\n<p>somaxconn &#061; 1024<\/p>\n<p>\u5bf9\u666e\u901a\u5c0f\u7f51\u7ad9\u5176\u5b9e\u4e0d\u4e00\u5b9a\u6709\u95ee\u9898\u3002<\/p>\n<p>\u4f46\u8fd9\u53f0\u670d\u52a1\u5668\u540c\u65f6\u8fd0\u884c&#xff1a;<\/p>\n<p>Nginx<br \/>\nPHP-FPM<br \/>\nJava<br \/>\nRedis<br \/>\nMySQL<\/p>\n<p>\u5e76\u4e14\u5386\u53f2\u4e0a\u5df2\u7ecf\u660e\u786e\u53d1\u751f\u8fc7 SYN drop&#xff0c;\u90a3\u4e48\u7ee7\u7eed\u4fdd\u6301 1024 \u5c31\u6ca1\u6709\u4ec0\u4e48\u5fc5\u8981\u4e86\u3002<\/p>\n<p>\u6700\u7ec8\u6211\u628a\u8fd9\u51e0\u4e2a\u53c2\u6570\u8c03\u6574\u4e3a&#xff1a;<\/p>\n<p>net.core.somaxconn &#061; 8192<br \/>\nnet.ipv4.tcp_max_syn_backlog &#061; 8192<br \/>\nnet.core.netdev_max_backlog &#061; 8192<\/p>\n<p>\u8fd9\u91cc\u6211\u6ca1\u6709\u7167\u7740\u7f51\u4e0a\u4e00\u4e9b\u6587\u7ae0\u76f4\u63a5\u641e&#xff1a;<\/p>\n<p>65535<br \/>\n262144<br \/>\n500000<\/p>\n<p>\u539f\u56e0\u5f88\u7b80\u5355&#xff1a;<\/p>\n<p>\u7cfb\u7edf\u4f18\u5316\u4e0d\u662f\u6570\u5b57\u8d8a\u5927\u8d8a\u597d\u3002<\/p>\n<p>\u4ece 1024 \u8c03\u6574\u5230 8192&#xff0c;\u662f\u56e0\u4e3a\u5df2\u7ecf\u6709\u771f\u5b9e\u6570\u636e\u8bc1\u660e\u961f\u5217\u66fe\u7ecf\u627f\u53d7\u8fc7\u538b\u529b\u3002<\/p>\n<p>\u5982\u679c\u670d\u52a1\u5668\u4e00\u5929\u53ea\u6709\u51e0\u767e\u4e2a\u8bbf\u95ee&#xff0c;\u628a\u53c2\u6570\u8c03\u5230\u51e0\u5341\u4e07\u5e76\u4e0d\u4f1a\u8ba9\u63a5\u53e3\u7a81\u7136\u5feb\u5341\u500d\u3002<\/p>\n<hr \/>\n<h2>\u4e94\u3001TIME_WAIT \u53c2\u6570\u4e5f\u53d1\u73b0\u4e86\u4e00\u4e2a\u5751<\/h2>\n<p>\u670d\u52a1\u5668\u539f\u6765\u7684\u914d\u7f6e&#xff1a;<\/p>\n<p>tcp_max_tw_buckets &#061; 5000<br \/>\ntcp_fin_timeout &#061; 60<br \/>\ntcp_tw_reuse &#061; 0<\/p>\n<p>tcp_max_tw_buckets&#061;5000 \u5bf9\u8fd9\u79cd\u7ebf\u4e0a\u6df7\u5408\u670d\u52a1\u5668\u660e\u663e\u504f\u4fdd\u5b88\u3002<\/p>\n<p>\u4e8e\u662f\u8c03\u6574\u4e3a&#xff1a;<\/p>\n<p>net.ipv4.tcp_max_tw_buckets &#061; 65536<br \/>\nnet.ipv4.tcp_fin_timeout &#061; 30<\/p>\n<p>\u4f46\u662f\u6709\u4e00\u4e2a\u53c2\u6570\u6211\u6ca1\u6709\u52a8&#xff1a;<\/p>\n<p>tcp_tw_reuse &#061; 0<\/p>\n<p>\u539f\u56e0\u662f\u8fd9\u53f0\u670d\u52a1\u5668\u8fd0\u884c\u7684\u662f&#xff1a;<\/p>\n<p>CentOS 7<br \/>\nLinux Kernel 3.10<\/p>\n<p>\u800c\u53e6\u5916\u4e00\u53f0\u65b0\u670d\u52a1\u5668\u8fd0\u884c\u7684\u662f Linux 5.14&#xff0c;tcp_tw_reuse \u5728\u4e0d\u540c\u5e74\u4ee3\u5185\u6838\u4e2d\u7684\u884c\u4e3a\u548c\u53ef\u7528\u503c\u4e0d\u80fd\u7b80\u5355\u7167\u642c\u3002<\/p>\n<p>\u5c24\u5176\u662f\u7f51\u4e0a\u7ecf\u5e38\u80fd\u770b\u5230\u8fd9\u79cd\u201c\u7956\u4f20 Linux \u4f18\u5316\u914d\u7f6e\u201d&#xff1a;<\/p>\n<p>tcp_tw_reuse &#061; 1<br \/>\ntcp_tw_recycle &#061; 1<\/p>\n<p>\u770b\u5230\u8fd9\u79cd\u914d\u7f6e\u6700\u597d\u5148\u505c\u4e00\u4e0b\u3002<\/p>\n<p>\u7279\u522b\u662f tcp_tw_recycle&#xff0c;\u5728 NAT\u3001\u8d1f\u8f7d\u5747\u8861\u7b49\u73af\u5883\u4e0b\u66fe\u7ecf\u5e26\u6765\u8fc7\u5f88\u591a\u83ab\u540d\u5176\u5999\u7684\u8fde\u63a5\u95ee\u9898&#xff0c;\u540e\u6765\u7684 Linux \u5185\u6838\u4e5f\u5df2\u7ecf\u5c06\u5176\u79fb\u9664\u3002<\/p>\n<p>\u6240\u4ee5\u6211\u7684\u539f\u5219\u4e00\u76f4\u662f&#xff1a;<\/p>\n<p>\u4e0d\u77e5\u9053\u4e00\u4e2a\u53c2\u6570\u4e3a\u4ec0\u4e48\u8981\u6539&#xff0c;\u5c31\u5148\u4e0d\u8981\u6539\u3002<\/p>\n<hr \/>\n<h2>\u516d\u3001\u4e34\u65f6\u7aef\u53e3\u8303\u56f4\u4e5f\u503c\u5f97\u6ce8\u610f<\/h2>\n<p>\u670d\u52a1\u5668\u539f\u6765\u7684&#xff1a;<\/p>\n<p>ip_local_port_range &#061; 32768 60999<\/p>\n<p>\u5927\u7ea6\u53ea\u6709 2.8 \u4e07\u4e2a\u4e34\u65f6\u7aef\u53e3\u3002<\/p>\n<p>\u5f88\u591a\u4eba\u8ba4\u4e3a Web \u670d\u52a1\u5668\u53ea\u8d1f\u8d23\u201c\u63a5\u6536\u8fde\u63a5\u201d&#xff0c;\u5176\u5b9e\u73b0\u5728\u7684\u4e1a\u52a1\u670d\u52a1\u5668\u5f80\u5f80\u540c\u65f6\u4e5f\u662f\u5ba2\u6237\u7aef\u3002<\/p>\n<p>\u4f8b\u5982&#xff1a;<\/p>\n<p>\u7528\u6237<br \/>\n \u2193<br \/>\nNginx<br \/>\n \u2193<br \/>\nJava<br \/>\n \u2193<br \/>\nRedis \/ MySQL \/ \u5176\u4ed6\u5fae\u670d\u52a1 \/ \u7b2c\u4e09\u65b9API<\/p>\n<p>Java \u8c03\u7b2c\u4e09\u65b9 HTTP API\u3001PHP \u8bf7\u6c42\u5185\u90e8\u670d\u52a1\u3001Nginx \u53cd\u5411\u4ee3\u7406\u540e\u7aef&#xff0c;\u672c\u8d28\u4e0a\u90fd\u53ef\u80fd\u4ea7\u751f\u4e3b\u52a8 TCP \u8fde\u63a5\u3002<\/p>\n<p>\u56e0\u6b64\u6700\u7ec8\u8c03\u6574&#xff1a;<\/p>\n<p>net.ipv4.ip_local_port_range &#061; 10000 65535<\/p>\n<p>\u628a\u53ef\u4f7f\u7528\u8303\u56f4\u6269\u5927\u5230 5 \u4e07\u591a\u4e2a\u3002<\/p>\n<p>\u5f53\u7136&#xff0c;\u771f\u6b63\u89e3\u51b3\u5927\u91cf\u77ed\u8fde\u63a5\u95ee\u9898&#xff0c;\u4f18\u5148\u7ea7\u66f4\u9ad8\u7684\u4f9d\u7136\u5e94\u8be5\u662f&#xff1a;<\/p>\n<p>HTTP KeepAlive<br \/>\n\u6570\u636e\u5e93\u8fde\u63a5\u6c60<br \/>\nRedis\u8fde\u63a5\u6c60<br \/>\nRPC\u957f\u8fde\u63a5<br \/>\n\u8fde\u63a5\u590d\u7528<\/p>\n<p>\u800c\u4e0d\u662f\u53ea\u60f3\u7740\u9760 Linux \u53c2\u6570\u515c\u5e95\u3002<\/p>\n<hr \/>\n<h2>\u4e03\u3001KeepAlive \u9ed8\u8ba4 7200 \u79d2&#xff0c;\u4e5f\u6709\u70b9\u592a\u4f5b\u7cfb\u4e86<\/h2>\n<p>\u539f\u6765\u7684\u53c2\u6570&#xff1a;<\/p>\n<p>tcp_keepalive_time &#061; 7200<br \/>\ntcp_keepalive_intvl &#061; 75<br \/>\ntcp_keepalive_probes &#061; 9<\/p>\n<p>\u7b80\u5355\u7406\u89e3\u5c31\u662f&#xff1a;<\/p>\n<p>\u4e00\u4e2a TCP \u8fde\u63a5\u957f\u65f6\u95f4\u6ca1\u6709\u6570\u636e&#xff0c;Linux \u9ed8\u8ba4\u8981\u7b49\u5f88\u4e45\u624d\u5f00\u59cb\u4e3b\u52a8\u63a2\u6d4b\u5b83\u662f\u4e0d\u662f\u5df2\u7ecf\u5931\u6548\u3002<\/p>\n<p>\u8fd9\u53f0\u670d\u52a1\u5668\u957f\u671f\u5b58\u5728\u4e00\u5343\u591a\u4e2a ESTABLISHED&#xff0c;\u6240\u4ee5\u6211\u6700\u7ec8\u8c03\u6574\u4e3a&#xff1a;<\/p>\n<p>net.ipv4.tcp_keepalive_time &#061; 600<br \/>\nnet.ipv4.tcp_keepalive_intvl &#061; 30<br \/>\nnet.ipv4.tcp_keepalive_probes &#061; 5<\/p>\n<p>\u4e5f\u5c31\u662f\u66f4\u52a0\u79ef\u6781\u5730\u6e05\u7406\u771f\u6b63\u5931\u6548\u7684\u957f\u8fde\u63a5\u3002<\/p>\n<p>\u4f46\u8fd9\u91cc\u540c\u6837\u8981\u63d0\u9192&#xff1a;<\/p>\n<p>Linux KeepAlive \u4e0d\u662f\u4e07\u80fd\u836f\u3002<\/p>\n<p>\u5982\u679c\u4f60\u53d1\u73b0&#xff1a;<\/p>\n<p>CLOSE_WAIT<\/p>\n<p>\u6301\u7eed\u51e0\u767e\u3001\u51e0\u5343\u5730\u4e0a\u6da8&#xff0c;\u90a3\u4e48\u66f4\u5e94\u8be5\u68c0\u67e5\u5e94\u7528\u7a0b\u5e8f\u6709\u6ca1\u6709\u6b63\u786e\u5173\u95ed socket&#xff0c;\u800c\u4e0d\u662f\u7ee7\u7eed\u4fee\u6539 sysctl\u3002<\/p>\n<p>\u8fd9\u6b21\u670d\u52a1\u5668 CLOSE_WAIT \u53ea\u6709 7 \u4e2a&#xff0c;\u6240\u4ee5\u6682\u65f6\u6ca1\u6709\u8fd9\u4e2a\u95ee\u9898\u3002<\/p>\n<hr \/>\n<h2>\u516b\u3001Socket Buffer \u4e5f\u987a\u624b\u8c03\u6574\u4e86<\/h2>\n<p>\u670d\u52a1\u5668\u9ed8\u8ba4&#xff1a;<\/p>\n<p>net.core.rmem_max &#061; 212992<br \/>\nnet.core.wmem_max &#061; 212992<\/p>\n<p>\u4e5f\u5c31\u662f\u5927\u7ea6 208KB\u3002<\/p>\n<p>\u6700\u7ec8\u8c03\u6574&#xff1a;<\/p>\n<p>net.core.rmem_max &#061; 16777216<br \/>\nnet.core.wmem_max &#061; 16777216<\/p>\n<p>net.ipv4.tcp_rmem &#061; 4096 87380 16777216<br \/>\nnet.ipv4.tcp_wmem &#061; 4096 16384 16777216<\/p>\n<p>\u6700\u5927\u63d0\u9ad8\u5230 16MB\u3002<\/p>\n<p>\u8fd9\u91cc\u5f88\u5bb9\u6613\u4ea7\u751f\u4e00\u4e2a\u8bef\u533a&#xff1a;<\/p>\n<p>1000 \u4e2a TCP \u00d7 16MB&#xff0c;\u90a3\u4e0d\u662f\u76f4\u63a5\u5403\u6389 16GB \u5185\u5b58&#xff1f;<\/p>\n<p>\u5e76\u4e0d\u662f\u3002<\/p>\n<p>\u8fd9\u91cc\u66f4\u591a\u662f\u7ed9 TCP \u81ea\u52a8\u8c03\u8282\u63d0\u4f9b\u4e00\u4e2a\u66f4\u9ad8\u7684\u4e0a\u9650&#xff0c;\u4e0d\u610f\u5473\u7740\u6bcf\u5efa\u7acb\u4e00\u4e2a\u8fde\u63a5\u5c31\u7acb\u5373\u5206\u914d 16MB\u3002<\/p>\n<hr \/>\n<h2>\u4e5d\u3001\u6700\u6709\u610f\u601d\u7684\u95ee\u9898&#xff1a;\u53c2\u6570\u660e\u660e\u6539\u4e86&#xff0c;\u4e3a\u4ec0\u4e48\u8fd8\u662f 1024&#xff1f;<\/h2>\n<p>\u914d\u7f6e\u5199\u5b8c\u540e&#xff0c;\u6211\u6267\u884c&#xff1a;<\/p>\n<p><span class=\"token function\">sysctl<\/span> <span class=\"token parameter variable\">&#8211;system<\/span><\/p>\n<p>\u660e\u660e\u770b\u5230&#xff1a;<\/p>\n<p>net.core.somaxconn &#061; 8192<br \/>\nnet.ipv4.tcp_max_syn_backlog &#061; 8192<br \/>\nnet.ipv4.tcp_max_tw_buckets &#061; 65536<\/p>\n<p>\u4f46\u91cd\u65b0\u68c0\u67e5&#xff1a;<\/p>\n<p><span class=\"token function\">sysctl<\/span> net.core.somaxconn<\/p>\n<p>\u5c45\u7136\u8fd8\u662f&#xff1a;<\/p>\n<p>1024<\/p>\n<p>\u4e00\u5f00\u59cb\u5f88\u5bb9\u6613\u6000\u7591&#xff1a;<\/p>\n<p>\u662f\u4e0d\u662f CentOS 7 \u5185\u6838\u4e0d\u652f\u6301&#xff1f;<\/p>\n<p>\u662f\u4e0d\u662f\u53c2\u6570\u8d85\u8fc7\u4e0a\u9650&#xff1f;<\/p>\n<p>\u662f\u4e0d\u662f\u9700\u8981\u91cd\u542f&#xff1f;<\/p>\n<p>\u540e\u6765\u4ed4\u7ec6\u770b sysctl &#8211;system \u7684\u8f93\u51fa\u624d\u53d1\u73b0&#xff0c;\u771f\u6b63\u7684\u95ee\u9898\u975e\u5e38\u7b80\u5355&#xff1a;<\/p>\n<p>\u914d\u7f6e\u88ab\u540e\u9762\u7684\u6587\u4ef6\u8986\u76d6\u4e86\u3002<\/p>\n<p>\u6267\u884c\u987a\u5e8f\u91cc\u5148\u52a0\u8f7d&#xff1a;<\/p>\n<p>\/etc\/sysctl.d\/99-high-concurrency.conf<\/p>\n<p>\u8bbe\u7f6e&#xff1a;<\/p>\n<p>somaxconn &#061; 8192<\/p>\n<p>\u968f\u540e\u53c8\u52a0\u8f7d&#xff1a;<\/p>\n<p>\/etc\/sysctl.d\/99-sysctl.conf<\/p>\n<p>\u91cd\u65b0\u53d8\u6210&#xff1a;<\/p>\n<p>somaxconn &#061; 1024<\/p>\n<p>\u6700\u540e\u53c8\u52a0\u8f7d&#xff1a;<\/p>\n<p>\/etc\/sysctl.conf<\/p>\n<p>\u4e8e\u662f\u6700\u7ec8\u7ed3\u679c\u8fd8\u662f 1024\u3002<\/p>\n<p>\u7ee7\u7eed\u68c0\u67e5&#xff1a;<\/p>\n<p><span class=\"token function\">ls<\/span> <span class=\"token parameter variable\">-l<\/span> \/etc\/sysctl.d\/99-sysctl.conf<\/p>\n<p>\u53d1\u73b0&#xff1a;<\/p>\n<p>\/etc\/sysctl.d\/99-sysctl.conf -&gt; ..\/sysctl.conf<\/p>\n<p>\u539f\u6765 99-sysctl.conf \u672c\u8eab\u5c31\u662f\u6307\u5411 \/etc\/sysctl.conf \u7684\u8f6f\u94fe\u63a5\u3002<\/p>\n<p>\u518d\u67e5&#xff1a;<\/p>\n<p><span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-nE<\/span> <span class=\"token string\">&#039;somaxconn|tcp_max_syn_backlog|tcp_max_tw_buckets|swappiness&#039;<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n\/etc\/sysctl.conf <span class=\"token punctuation\">\\\\<\/span><br \/>\n\/etc\/sysctl.d\/*.conf<\/p>\n<p>\u9a6c\u4e0a\u770b\u51fa\u6765 \/etc\/sysctl.conf \u91cc\u9762\u540c\u65f6\u5b58\u5728&#xff1a;<\/p>\n<p>somaxconn &#061; 1024<\/p>\n<p>\u548c&#xff1a;<\/p>\n<p>somaxconn &#061; 8192<\/p>\n<p>\u4e24\u5957\u53c2\u6570\u3002<\/p>\n<p>\u6700\u7ec8\u628a\u65e7\u914d\u7f6e\u6e05\u7406\u6389&#xff0c;\u53ea\u4fdd\u7559\u65b0\u7684\u503c&#xff0c;\u518d\u91cd\u65b0\u52a0\u8f7d&#xff1a;<\/p>\n<p><span class=\"token function\">sysctl<\/span> <span class=\"token parameter variable\">-p<\/span><\/p>\n<p>\u95ee\u9898\u89e3\u51b3\u3002<\/p>\n<p>\u8fd9\u4e2a\u5c0f\u63d2\u66f2\u5176\u5b9e\u7279\u522b\u6709\u4ee3\u8868\u6027\u3002<\/p>\n<p>Linux \u8c03\u4f18\u6700\u6015\u7684\u4e0d\u662f\u4e0d\u4f1a\u6539&#xff0c;\u800c\u662f\u4f60\u4ee5\u4e3a\u81ea\u5df1\u6539\u4e86\u3002<\/p>\n<p>\u4efb\u4f55 sysctl \u4fee\u6539\u5b8c\u6210\u4e4b\u540e&#xff0c;\u90fd\u5e94\u8be5\u91cd\u65b0\u6267\u884c&#xff1a;<\/p>\n<p><span class=\"token function\">sysctl<\/span> net.core.somaxconn<\/p>\n<p>\u786e\u8ba4\u5f53\u524d\u5185\u6838\u771f\u6b63\u4f7f\u7528\u7684\u503c\u3002<\/p>\n<p>\u4e0d\u8981\u53ea\u770b\u5230\u914d\u7f6e\u6587\u4ef6\u5199\u6210\u529f\u5c31\u8ba4\u4e3a\u7ed3\u675f\u4e86\u3002<\/p>\n<hr \/>\n<h2>\u5341\u3001\u6700\u7ec8\u4f18\u5316\u540e\u7684\u670d\u52a1\u5668\u662f\u4ec0\u4e48\u72b6\u6001&#xff1f;<\/h2>\n<p>\u518d\u6b21\u8fd0\u884c\u4f53\u68c0\u811a\u672c&#xff0c;\u6838\u5fc3\u53c2\u6570\u5df2\u7ecf\u53d8\u6210&#xff1a;<\/p>\n<p>net.core.somaxconn &#061; 8192<br \/>\ntcp_max_syn_backlog &#061; 8192<br \/>\nnet.core.netdev_max_backlog &#061; 8192<\/p>\n<p>tcp_fin_timeout &#061; 30<br \/>\ntcp_max_tw_buckets &#061; 65536<\/p>\n<p>tcp_keepalive_time &#061; 600<br \/>\ntcp_keepalive_intvl &#061; 30<br \/>\ntcp_keepalive_probes &#061; 5<\/p>\n<p>rmem_max &#061; 16777216<br \/>\nwmem_max &#061; 16777216<\/p>\n<p>ip_local_port_range &#061; 10000 65535<\/p>\n<p>kernel.pid_max &#061; 262144<\/p>\n<p>\u66f4\u503c\u5f97\u5173\u6ce8\u7684\u662f\u4f18\u5316\u524d&#xff1a;<\/p>\n<p>299729 SYNs to LISTEN sockets dropped<\/p>\n<p>\u4f18\u5316\u4e4b\u540e\u518d\u6b21\u68c0\u67e5&#xff1a;<\/p>\n<p>299729 SYNs to LISTEN sockets dropped<\/p>\n<p>\u6ca1\u6709\u7ee7\u7eed\u589e\u957f\u3002<\/p>\n<p>\u5f53\u7136&#xff0c;\u8fd9\u5e76\u4e0d\u80fd\u4ec5\u51ed\u5341\u51e0\u5206\u949f\u5c31\u5ba3\u5e03\u95ee\u9898\u5f7b\u5e95\u89e3\u51b3&#xff0c;\u56e0\u4e3a netstat -s \u7edf\u8ba1\u7684\u662f\u7cfb\u7edf\u542f\u52a8\u4ee5\u6765\u7684\u7d2f\u8ba1\u6570\u636e\u3002<\/p>\n<p>\u6b63\u786e\u89c2\u5bdf\u65b9\u6cd5\u5e94\u8be5\u662f&#xff1a;<\/p>\n<p><span class=\"token function\">date<\/span><br \/>\n<span class=\"token function\">netstat<\/span> <span class=\"token parameter variable\">-s<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-iE<\/span> <span class=\"token string\">&#034;SYNs to LISTEN|listen queue|TCPBacklogDrop|reset&#034;<\/span><\/p>\n<p>\u8bb0\u5f55\u4e0b\u6765\u3002<\/p>\n<p>\u7b49\u4e1a\u52a1\u9ad8\u5cf0\u8fc7\u53bb&#xff0c;\u518d\u6267\u884c\u4e00\u6b21\u3002<\/p>\n<p>\u5982\u679c&#xff1a;<\/p>\n<p>299729<br \/>\n\u2193<br \/>\n299729<\/p>\n<p>\u8bf4\u660e\u8fd9\u6bb5\u65f6\u95f4\u6ca1\u6709\u65b0\u589e\u3002<\/p>\n<p>\u5982\u679c&#xff1a;<\/p>\n<p>299729<br \/>\n\u2193<br \/>\n310000<\/p>\n<p>\u90a3\u8bf4\u660e\u4ecd\u7136\u5b58\u5728\u95ee\u9898\u3002<\/p>\n<p>\u8fd9\u65f6\u5019\u5c31\u4e0d\u80fd\u7ee7\u7eed\u65e0\u8111&#xff1a;<\/p>\n<p>8192 \u2192 16384 \u2192 65535<\/p>\n<p>\u800c\u5e94\u8be5\u7ee7\u7eed\u5411\u5e94\u7528\u5c42\u6392\u67e5\u3002<\/p>\n<hr \/>\n<h2>\u5341\u4e00\u3001Linux \u8c03\u5b8c\u4ee5\u540e&#xff0c;\u522b\u5fd8\u4e86 Nginx<\/h2>\n<p>\u8fd9\u6b21\u68c0\u67e5\u8fd8\u6709\u4e00\u4e2a\u5f88\u5178\u578b\u7684\u95ee\u9898\u3002<\/p>\n<p>Linux \u5df2\u7ecf&#xff1a;<\/p>\n<p>somaxconn &#061; 8192<\/p>\n<p>\u4f46&#xff1a;<\/p>\n<p>ss <span class=\"token parameter variable\">-lntp<\/span><\/p>\n<p>\u770b\u5230 Nginx&#xff1a;<\/p>\n<p>LISTEN 0 511 *:80<br \/>\nLISTEN 0 511 *:443<\/p>\n<p>\u4e5f\u5c31\u662f\u8bf4\u64cd\u4f5c\u7cfb\u7edf\u5141\u8bb8 8192&#xff0c;\u4f46 Nginx \u5b9e\u9645\u76d1\u542c backlog \u8fd8\u662f 511\u3002<\/p>\n<p>\u7ee7\u7eed\u68c0\u67e5&#xff1a;<\/p>\n<p>nginx <span class=\"token parameter variable\">-T<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-E<\/span> <span class=\"token string\">&#034;worker_processes|worker_connections|multi_accept&#034;<\/span><\/p>\n<p>\u53d1\u73b0&#xff1a;<\/p>\n<p>worker_processes auto;<br \/>\nworker_connections 51200;<br \/>\nmulti_accept on;<\/p>\n<p>Nginx worker \u672c\u8eab\u5176\u5b9e\u5df2\u7ecf\u914d\u7f6e\u5f97\u4e0d\u9519\u3002<\/p>\n<p>\u4e0b\u4e00\u6b65\u771f\u6b63\u503c\u5f97\u5173\u6ce8\u7684\u662f&#xff1a;<\/p>\n<p>listen 80 backlog&#061;4096;<br \/>\nlisten 443 ssl backlog&#061;4096;<\/p>\n<p>\u4f46\u8fd9\u7c7b\u914d\u7f6e\u4e0d\u8981\u76f4\u63a5\u7528 sed \u6279\u91cf\u66ff\u6362\u3002<\/p>\n<p>\u56e0\u4e3a\u4e00\u53f0\u670d\u52a1\u5668\u5f80\u5f80\u5b58\u5728\u591a\u4e2a\u865a\u62df\u4e3b\u673a&#xff0c;\u540c\u65f6\u8fd8\u6709&#xff1a;<\/p>\n<p>listen 80;<br \/>\nlisten [::]:80;<br \/>\nlisten 443 ssl;<\/p>\n<p>\u591a\u4e2a\u76d1\u542c\u914d\u7f6e\u3002<\/p>\n<p>\u5e94\u8be5\u5148&#xff1a;<\/p>\n<p>nginx <span class=\"token parameter variable\">-T<\/span><\/p>\n<p>\u627e\u5230\u771f\u6b63\u7684\u914d\u7f6e\u6587\u4ef6&#xff0c;\u518d\u9488\u5bf9\u6027\u8c03\u6574\u3002<\/p>\n<p>\u5426\u5219\u6027\u80fd\u6ca1\u4f18\u5316\u591a\u5c11&#xff0c;\u53cd\u800c\u5148\u628a Nginx \u914d\u6302\u4e86\u3002<\/p>\n<hr \/>\n<h2>\u5341\u4e8c\u3001Java\u3001PHP\u3001Redis\u3001MySQL\u540c\u6837\u5b58\u5728\u81ea\u5df1\u7684\u201c\u961f\u5217\u201d<\/h2>\n<p>\u8fd9\u4e5f\u662f\u8fd9\u6b21\u4f53\u68c0\u4e4b\u540e\u6700\u5927\u7684\u4e00\u4e2a\u611f\u53d7&#xff1a;<\/p>\n<p>\u9ad8\u5e76\u53d1\u4f18\u5316\u4ece\u6765\u4e0d\u662f\u4e00\u4e2a sysctl.conf \u5c31\u80fd\u89e3\u51b3\u3002<\/p>\n<p>\u6bd4\u5982\u8fd9\u53f0\u673a\u5668\u7684 Java&#xff1a;<\/p>\n<p>8080  LISTEN backlog&#061;1000<br \/>\n18080 LISTEN backlog&#061;100<\/p>\n<p>8080 \u5df2\u7ecf\u6bd4\u8f83\u5408\u7406\u3002<\/p>\n<p>18080 \u5982\u679c\u662f\u4e00\u4e2a\u9ad8\u6d41\u91cf Spring Boot \u670d\u52a1&#xff0c;\u5c31\u5e94\u8be5\u7ee7\u7eed\u68c0\u67e5&#xff1a;<\/p>\n<p>server.tomcat.accept-count&#061;1000<br \/>\nserver.tomcat.threads.max&#061;300<br \/>\nserver.tomcat.threads.min-spare&#061;20<\/p>\n<p>\u4f46\u662f\u7ebf\u7a0b\u4e5f\u4e0d\u662f\u8d8a\u591a\u8d8a\u597d\u3002<\/p>\n<p>\u5047\u5982&#xff1a;<\/p>\n<p>Tomcat\u7ebf\u7a0b &#061; 1000<br \/>\n\u6570\u636e\u5e93\u8fde\u63a5\u6c60 &#061; 30<\/p>\n<p>\u5927\u91cf\u7ebf\u7a0b\u6700\u7ec8\u8fd8\u662f\u5835\u5728\u6570\u636e\u5e93\u8fde\u63a5\u6c60\u524d\u9762\u3002<\/p>\n<p>\u771f\u6b63\u5408\u7406\u7684\u94fe\u8def\u5e94\u8be5\u662f\u6574\u4f53\u5339\u914d&#xff1a;<\/p>\n<p>Linux TCP<br \/>\n     \u2193<br \/>\nNginx<br \/>\n     \u2193<br \/>\nTomcat<br \/>\n     \u2193<br \/>\n\u4e1a\u52a1\u7ebf\u7a0b<br \/>\n     \u2193<br \/>\n\u6570\u636e\u5e93\u8fde\u63a5\u6c60<br \/>\n     \u2193<br \/>\nMySQL<\/p>\n<p>\u5176\u4e2d\u4efb\u4f55\u4e00\u5c42\u7279\u522b\u5c0f&#xff0c;\u90fd\u53ef\u80fd\u6210\u4e3a\u6574\u4e2a\u7cfb\u7edf\u7684\u74f6\u9888\u3002<\/p>\n<hr \/>\n<h2>\u5341\u4e09\u3001\u8fd9\u6b21\u8fd8\u987a\u4fbf\u53d1\u73b0 Redis \u76d1\u542c\u6240\u6709\u7f51\u5361<\/h2>\n<p>\u4f53\u68c0\u7ed3\u679c&#xff1a;<\/p>\n<p>*:6379<br \/>\nredis-server<\/p>\n<p>\u8fd9\u610f\u5473\u7740 Redis \u76d1\u542c\u6240\u6709 IPv4 \u5730\u5740\u3002<\/p>\n<p>\u5b83\u4e0d\u4e00\u5b9a\u771f\u7684\u66b4\u9732\u516c\u7f51&#xff0c;\u56e0\u4e3a\u5916\u9762\u53ef\u80fd\u8fd8\u6709\u5b89\u5168\u7ec4\u3001\u9632\u706b\u5899\u3002<\/p>\n<p>\u4f46\u81f3\u5c11\u503c\u5f97\u7ee7\u7eed\u68c0\u67e5&#xff1a;<\/p>\n<p>redis-cli CONFIG GET protected-mode<br \/>\nredis-cli CONFIG GET requirepass<\/p>\n<p>\u5982\u679c Redis \u53ea\u7ed9\u672c\u673a\u7a0b\u5e8f\u4f7f\u7528&#xff0c;\u5b8c\u5168\u53ef\u4ee5\u8003\u8651&#xff1a;<\/p>\n<p>bind 127.0.0.1<br \/>\nprotected-mode yes<\/p>\n<p>\u6709\u65f6\u5019\u670d\u52a1\u5668\u4f53\u68c0\u7684\u4ef7\u503c\u5c31\u5728\u8fd9\u91cc\u3002<\/p>\n<p>\u672c\u6765\u662f\u6765\u67e5\u6027\u80fd\u7684&#xff0c;\u987a\u624b\u628a\u5b89\u5168\u9690\u60a3\u4e5f\u7ffb\u51fa\u6765\u4e86\u3002<\/p>\n<hr \/>\n<h2>\u5341\u56db\u3001\u8fd8\u6709\u4e00\u4e2a\u6211\u6700\u7ec8\u6ca1\u6709\u5ffd\u7565\u7684\u95ee\u9898&#xff1a;Swap<\/h2>\n<p>\u8fd9\u53f0\u670d\u52a1\u5668&#xff1a;<\/p>\n<p>\u603b\u5185\u5b58&#xff1a;7.4G<br \/>\n\u5df2\u4f7f\u7528&#xff1a;5.5G<br \/>\navailable&#xff1a;1.6G<br \/>\nSwap&#xff1a;0<\/p>\n<p>\u800c\u673a\u5668\u4e0a\u540c\u65f6\u8dd1&#xff1a;<\/p>\n<p>Nginx<br \/>\nPHP-FPM<br \/>\nRedis<br \/>\nMySQL<br \/>\nJava<br \/>\n\u5b9d\u5854<\/p>\n<p>CPU \u5f88\u95f2&#xff0c;\u4f46\u5185\u5b58\u5176\u5b9e\u6ca1\u6709\u60f3\u8c61\u4e2d\u5bbd\u88d5\u3002<\/p>\n<p>\u56e0\u6b64\u6211\u7684\u5efa\u8bae\u662f\u589e\u52a0 2GB \u5de6\u53f3 Swap&#xff1a;<\/p>\n<p>fallocate <span class=\"token parameter variable\">-l<\/span> 2G \/swapfile<br \/>\n<span class=\"token function\">chmod<\/span> <span class=\"token number\">600<\/span> \/swapfile<br \/>\n<span class=\"token function\">mkswap<\/span> \/swapfile<br \/>\n<span class=\"token function\">swapon<\/span> \/swapfile<\/p>\n<p>\u7136\u540e&#xff1a;<\/p>\n<p><span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#039;\/swapfile swap swap defaults 0 0&#039;<\/span> <span class=\"token operator\">&gt;&gt;<\/span> \/etc\/fstab<\/p>\n<p>\u540c\u65f6&#xff1a;<\/p>\n<p>vm.swappiness &#061; 10<\/p>\n<p>\u8fd9\u91cc\u4e0d\u662f\u8ba9 Java\u3001MySQL \u5e73\u65f6\u9760 Swap \u8dd1\u3002<\/p>\n<p>Swap \u5728\u8fd9\u79cd\u670d\u52a1\u5668\u4e0a\u66f4\u50cf\u4e00\u9053\u4fdd\u9669\u3002<\/p>\n<p>\u5e73\u65f6\u4e0d\u7528\u6700\u597d&#xff0c;\u4f46\u67d0\u4e2a\u8fdb\u7a0b\u7a81\u7136\u51fa\u73b0\u5185\u5b58\u5c16\u5cf0\u7684\u65f6\u5019&#xff0c;\u81f3\u5c11\u4e0d\u8981\u8ba9 OOM Killer \u7b2c\u4e00\u65f6\u95f4\u51fa\u6765\u968f\u673a\u201c\u67aa\u6bd9\u201d\u8fdb\u7a0b\u3002<\/p>\n<hr \/>\n<h2>\u5341\u4e94\u3001\u6700\u540e\u6574\u7406\u4e00\u4efd\u670d\u52a1\u5668\u4f53\u68c0\u6e05\u5355<\/h2>\n<p>\u4ee5\u540e\u518d\u68c0\u67e5 CentOS\/Linux \u670d\u52a1\u5668&#xff0c;\u6211\u89c9\u5f97\u81f3\u5c11\u53ef\u4ee5\u5173\u6ce8\u4e0b\u9762\u8fd9\u4e9b\u4e1c\u897f\u3002<\/p>\n<h4>\u6587\u4ef6\u53e5\u67c4<\/h4>\n<p><span class=\"token builtin class-name\">ulimit<\/span> <span class=\"token parameter variable\">-n<\/span><br \/>\n<span class=\"token builtin class-name\">ulimit<\/span> <span class=\"token parameter variable\">-Hn<\/span><br \/>\n<span class=\"token function\">cat<\/span> \/proc\/sys\/fs\/file-nr<br \/>\n<span class=\"token function\">sysctl<\/span> fs.file-max<\/p>\n<p>\u91cd\u70b9\u9632&#xff1a;<\/p>\n<p>Too many open files<\/p>\n<h4>TCP \u8fde\u63a5<\/h4>\n<p>ss <span class=\"token parameter variable\">-s<\/span><br \/>\nss <span class=\"token parameter variable\">-ant<\/span><\/p>\n<p>\u91cd\u70b9\u5173\u6ce8&#xff1a;<\/p>\n<p>ESTABLISHED<br \/>\nTIME_WAIT<br \/>\nCLOSE_WAIT<br \/>\nSYN_RECV<\/p>\n<h4>TCP \u961f\u5217<\/h4>\n<p><span class=\"token function\">sysctl<\/span> net.core.somaxconn<br \/>\n<span class=\"token function\">sysctl<\/span> net.ipv4.tcp_max_syn_backlog<br \/>\n<span class=\"token function\">sysctl<\/span> net.core.netdev_max_backlog<\/p>\n<h4>TCP \u5386\u53f2\u5f02\u5e38<\/h4>\n<p><span class=\"token function\">netstat<\/span> <span class=\"token parameter variable\">-s<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-iE<\/span> <span class=\"token string\">&#034;overflow|drop|reset|listen&#034;<\/span><\/p>\n<p>\u8fd9\u6761\u6211\u8ba4\u4e3a\u7279\u522b\u91cd\u8981\u3002<\/p>\n<h4>\u5185\u6838\u5f02\u5e38<\/h4>\n<p><span class=\"token function\">dmesg<\/span> <span class=\"token parameter variable\">-T<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-iE<\/span> <span class=\"token string\">&#034;oom|drop|overflow|tcp|buffer|too many open&#034;<\/span><\/p>\n<h4>\u7cfb\u7edf\u8d44\u6e90<\/h4>\n<p><span class=\"token function\">free<\/span> <span class=\"token parameter variable\">-h<\/span><br \/>\n<span class=\"token function\">uptime<\/span><br \/>\n<span class=\"token function\">df<\/span> <span class=\"token parameter variable\">-h<\/span><\/p>\n<h4>\u5e94\u7528\u76d1\u542c\u961f\u5217<\/h4>\n<p>ss <span class=\"token parameter variable\">-lntp<\/span><\/p>\n<p>\u4e0d\u8981\u53ea\u770b Linux \u53c2\u6570\u3002<\/p>\n<p>\u91cd\u70b9\u770b\u770b&#xff1a;<\/p>\n<p>Nginx<br \/>\nJava<br \/>\nPHP-FPM<br \/>\nMySQL<br \/>\nRedis<\/p>\n<p>\u771f\u6b63\u7533\u8bf7\u7684 backlog \u662f\u591a\u5c11\u3002<\/p>\n<hr \/>\n<h2>\u5199\u5728\u6700\u540e<\/h2>\n<p>\u8fd9\u6b21\u670d\u52a1\u5668\u4f53\u68c0\u6700\u5927\u7684\u6536\u83b7&#xff0c;\u5e76\u4e0d\u662f\u628a&#xff1a;<\/p>\n<p>1024<\/p>\n<p>\u6539\u6210&#xff1a;<\/p>\n<p>8192<\/p>\n<p>\u800c\u662f\u8ba9\u6211\u91cd\u65b0\u786e\u8ba4\u4e86\u4e00\u4ef6\u4e8b&#xff1a;<\/p>\n<p>\u670d\u52a1\u5668\u4f18\u5316\u5e94\u8be5\u4ece\u8bc1\u636e\u51fa\u53d1&#xff0c;\u800c\u4e0d\u662f\u4ece\u7f51\u4e0a\u590d\u5236\u53c2\u6570\u51fa\u53d1\u3002<\/p>\n<p>\u5982\u679c\u6ca1\u6709&#xff1a;<\/p>\n<p>SYN drop<br \/>\nTCPBacklogDrop<br \/>\nTIME_WAIT Overflow<br \/>\nOOM<br \/>\nToo many open files<\/p>\n<p>\u8fd9\u4e9b\u771f\u5b9e\u8ff9\u8c61&#xff0c;\u90a3\u4e48\u5f88\u591a\u6240\u8c13\u201c\u9ad8\u5e76\u53d1\u53c2\u6570\u4f18\u5316\u201d\u5176\u5b9e\u6ca1\u6709\u5fc5\u8981\u3002<\/p>\n<p>\u4f46\u5982\u679c\u50cf\u8fd9\u6b21\u4e00\u6837&#xff0c;\u670d\u52a1\u5668\u5df2\u7ecf\u7559\u4e0b&#xff1a;<\/p>\n<p>299729 SYNs to LISTEN sockets dropped<\/p>\n<p>\u751a\u81f3&#xff1a;<\/p>\n<p>Possible SYN flooding on port 80<\/p>\n<p>\u90a3\u5c31\u8bf4\u660e\u7cfb\u7edf\u5df2\u7ecf\u660e\u786e\u544a\u8bc9\u4f60&#xff1a;<\/p>\n<p>\u8fd9\u91cc\u4ee5\u524d\u625b\u4e0d\u4f4f\u3002<\/p>\n<p>\u8fd9\u65f6\u5019\u518d\u6839\u636e\u8fde\u63a5\u961f\u5217\u3001Nginx backlog\u3001Tomcat accept-count\u3001\u6587\u4ef6\u53e5\u67c4\u3001\u5185\u5b58\u548c\u8fde\u63a5\u6c60\u9010\u5c42\u6392\u67e5&#xff0c;\u4f18\u5316\u624d\u771f\u6b63\u6709\u610f\u4e49\u3002<\/p>\n<p>\u6240\u4ee5&#xff0c;\u5982\u679c\u4f60\u7684\u7ebf\u4e0a\u670d\u52a1\u5668\u5df2\u7ecf\u7a33\u5b9a\u8fd0\u884c\u4e86\u4e00\u4e24\u5e74&#xff0c;\u6211\u53cd\u800c\u5efa\u8bae\u627e\u4e2a\u65f6\u95f4\u767b\u5f55\u4e0a\u53bb\u770b\u770b\u3002<\/p>\n<p>\u4e0d\u8981\u53ea\u6267\u884c&#xff1a;<\/p>\n<p><span class=\"token function\">top<\/span><\/p>\n<p>\u7136\u540e\u770b\u5230 CPU 5% \u5c31\u9000\u51fa\u3002<\/p>\n<p>\u770b\u770b&#xff1a;<\/p>\n<p><span class=\"token function\">netstat<\/span> <span class=\"token parameter variable\">-s<\/span><br \/>\n<span class=\"token function\">dmesg<\/span><br \/>\nss <span class=\"token parameter variable\">-s<\/span><br \/>\nss <span class=\"token parameter variable\">-lntp<\/span><\/p>\n<p>\u53ef\u80fd\u4f1a\u53d1\u73b0\u4e00\u4e9b\u5e73\u65f6\u5b8c\u5168\u6ce8\u610f\u4e0d\u5230\u7684\u4e1c\u897f\u3002<\/p>\n<p>\u670d\u52a1\u5668\u548c\u4eba\u5176\u5b9e\u6709\u70b9\u50cf\u3002<\/p>\n<p>\u5e73\u65f6\u80fd\u8dd1\u3001\u80fd\u5403\u3001\u80fd\u7761&#xff0c;\u4e0d\u4ee3\u8868\u4f53\u68c0\u62a5\u544a\u4e00\u5b9a\u6ca1\u6709\u5f02\u5e38\u3002<\/p>\n<p>\u4f60\u7684\u670d\u52a1\u5668&#xff0c;\u4e0a\u4e00\u6b21\u505a\u201c\u4f53\u68c0\u201d\u662f\u4ec0\u4e48\u65f6\u5019&#xff1f;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f60\u7684\u670d\u52a1\u5668\u505a\u8fc7\u4f53\u68c0\u4e48&#xff1f;\u4e00\u4efd\u771f\u5b9e\u7684 CentOS \u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u4f53\u68c0\u4e0e\u4f18\u5316\u5b9e\u5f55<br \/>\n\u670d\u52a1\u5668\u8dd1\u8d77\u6765\u4e4b\u540e&#xff0c;\u4f60\u591a\u4e45\u4f1a\u53bb\u770b\u4e00\u6b21\u5b83&#xff1f;<br \/>\n\u5f88\u591a\u4eba\u7684\u7b54\u6848\u53ef\u80fd\u662f&#xff1a;\u53ea\u8981\u670d\u52a1\u6ca1\u6302&#xff0c;\u6211\u5c31\u4e0d\u770b\u3002<br \/>\n\u6211\u4ee5\u524d\u4e5f\u5dee\u4e0d\u591a\u3002CPU \u6ca1\u7206\u3001\u5185\u5b58\u6ca1 OOM\u3001\u78c1\u76d8\u8fd8\u6709\u7a7a\u95f4\u3001\u63a5\u53e3\u80fd\u6b63\u5e38\u8bbf\u95ee&#xff0c;\u5c31\u89c9\u5f97\u670d\u52a1\u5668\u72b6\u6001\u5e94\u8be5\u6ca1\u4ec0\u4e48\u95ee\u9898\u3002<br \/>\n\u76f4\u5230\u6700\u8fd1\u5bf9\u51e0\u53f0\u7ebf\u4e0a CentOS \u670d\u52a1\u5668\u505a\u4e86\u4e00\u6b21\u6bd4\u8f83\u5b8c\u6574\u7684\u201c\u4f53\u68c0\u201d&#xff0c;\u6211\u624d\u53d1\u73b0\u4e00\u4e2a\u5f88\u5bb9\u6613\u88ab\u5ffd\u7565\u7684\u95ee\u9898&amp;#xff1<\/p>\n","protected":false},"author":2,"featured_media":97822,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[59,43,44],"topic":[],"class_list":["post-97823","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-centos","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f60\u7684\u670d\u52a1\u5668\u505a\u8fc7\u4f53\u68c0\u4e48\uff1f\u4e00\u4efd\u771f\u5b9e\u7684 CentOS \u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u4f53\u68c0\u4e0e\u4f18\u5316\u5b9e\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/97823.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f60\u7684\u670d\u52a1\u5668\u505a\u8fc7\u4f53\u68c0\u4e48\uff1f\u4e00\u4efd\u771f\u5b9e\u7684 CentOS \u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u4f53\u68c0\u4e0e\u4f18\u5316\u5b9e\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4f60\u7684\u670d\u52a1\u5668\u505a\u8fc7\u4f53\u68c0\u4e48&#xff1f;\u4e00\u4efd\u771f\u5b9e\u7684 CentOS \u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u4f53\u68c0\u4e0e\u4f18\u5316\u5b9e\u5f55 \u670d\u52a1\u5668\u8dd1\u8d77\u6765\u4e4b\u540e&#xff0c;\u4f60\u591a\u4e45\u4f1a\u53bb\u770b\u4e00\u6b21\u5b83&#xff1f; \u5f88\u591a\u4eba\u7684\u7b54\u6848\u53ef\u80fd\u662f&#xff1a;\u53ea\u8981\u670d\u52a1\u6ca1\u6302&#xff0c;\u6211\u5c31\u4e0d\u770b\u3002 \u6211\u4ee5\u524d\u4e5f\u5dee\u4e0d\u591a\u3002CPU \u6ca1\u7206\u3001\u5185\u5b58\u6ca1 OOM\u3001\u78c1\u76d8\u8fd8\u6709\u7a7a\u95f4\u3001\u63a5\u53e3\u80fd\u6b63\u5e38\u8bbf\u95ee&#xff0c;\u5c31\u89c9\u5f97\u670d\u52a1\u5668\u72b6\u6001\u5e94\u8be5\u6ca1\u4ec0\u4e48\u95ee\u9898\u3002 \u76f4\u5230\u6700\u8fd1\u5bf9\u51e0\u53f0\u7ebf\u4e0a CentOS \u670d\u52a1\u5668\u505a\u4e86\u4e00\u6b21\u6bd4\u8f83\u5b8c\u6574\u7684\u201c\u4f53\u68c0\u201d&#xff0c;\u6211\u624d\u53d1\u73b0\u4e00\u4e2a\u5f88\u5bb9\u6613\u88ab\u5ffd\u7565\u7684\u95ee\u9898&amp;#xff1\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/97823.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-30T02:16:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260830021655-6a9392977f46e.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/97823.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/97823.html\",\"name\":\"\u4f60\u7684\u670d\u52a1\u5668\u505a\u8fc7\u4f53\u68c0\u4e48\uff1f\u4e00\u4efd\u771f\u5b9e\u7684 CentOS \u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u4f53\u68c0\u4e0e\u4f18\u5316\u5b9e\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-30T02:16:58+00:00\",\"dateModified\":\"2026-08-30T02:16:58+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/97823.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/97823.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/97823.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f60\u7684\u670d\u52a1\u5668\u505a\u8fc7\u4f53\u68c0\u4e48\uff1f\u4e00\u4efd\u771f\u5b9e\u7684 CentOS \u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u4f53\u68c0\u4e0e\u4f18\u5316\u5b9e\u5f55\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4f60\u7684\u670d\u52a1\u5668\u505a\u8fc7\u4f53\u68c0\u4e48\uff1f\u4e00\u4efd\u771f\u5b9e\u7684 CentOS \u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u4f53\u68c0\u4e0e\u4f18\u5316\u5b9e\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/97823.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4f60\u7684\u670d\u52a1\u5668\u505a\u8fc7\u4f53\u68c0\u4e48\uff1f\u4e00\u4efd\u771f\u5b9e\u7684 CentOS \u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u4f53\u68c0\u4e0e\u4f18\u5316\u5b9e\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4f60\u7684\u670d\u52a1\u5668\u505a\u8fc7\u4f53\u68c0\u4e48&#xff1f;\u4e00\u4efd\u771f\u5b9e\u7684 CentOS \u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u4f53\u68c0\u4e0e\u4f18\u5316\u5b9e\u5f55 \u670d\u52a1\u5668\u8dd1\u8d77\u6765\u4e4b\u540e&#xff0c;\u4f60\u591a\u4e45\u4f1a\u53bb\u770b\u4e00\u6b21\u5b83&#xff1f; \u5f88\u591a\u4eba\u7684\u7b54\u6848\u53ef\u80fd\u662f&#xff1a;\u53ea\u8981\u670d\u52a1\u6ca1\u6302&#xff0c;\u6211\u5c31\u4e0d\u770b\u3002 \u6211\u4ee5\u524d\u4e5f\u5dee\u4e0d\u591a\u3002CPU \u6ca1\u7206\u3001\u5185\u5b58\u6ca1 OOM\u3001\u78c1\u76d8\u8fd8\u6709\u7a7a\u95f4\u3001\u63a5\u53e3\u80fd\u6b63\u5e38\u8bbf\u95ee&#xff0c;\u5c31\u89c9\u5f97\u670d\u52a1\u5668\u72b6\u6001\u5e94\u8be5\u6ca1\u4ec0\u4e48\u95ee\u9898\u3002 \u76f4\u5230\u6700\u8fd1\u5bf9\u51e0\u53f0\u7ebf\u4e0a CentOS \u670d\u52a1\u5668\u505a\u4e86\u4e00\u6b21\u6bd4\u8f83\u5b8c\u6574\u7684\u201c\u4f53\u68c0\u201d&#xff0c;\u6211\u624d\u53d1\u73b0\u4e00\u4e2a\u5f88\u5bb9\u6613\u88ab\u5ffd\u7565\u7684\u95ee\u9898&amp;#xff1","og_url":"https:\/\/www.wsisp.com\/helps\/97823.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-30T02:16:58+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260830021655-6a9392977f46e.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"6 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/97823.html","url":"https:\/\/www.wsisp.com\/helps\/97823.html","name":"\u4f60\u7684\u670d\u52a1\u5668\u505a\u8fc7\u4f53\u68c0\u4e48\uff1f\u4e00\u4efd\u771f\u5b9e\u7684 CentOS \u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u4f53\u68c0\u4e0e\u4f18\u5316\u5b9e\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-30T02:16:58+00:00","dateModified":"2026-08-30T02:16:58+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/97823.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/97823.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/97823.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4f60\u7684\u670d\u52a1\u5668\u505a\u8fc7\u4f53\u68c0\u4e48\uff1f\u4e00\u4efd\u771f\u5b9e\u7684 CentOS \u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u4f53\u68c0\u4e0e\u4f18\u5316\u5b9e\u5f55"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/97823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=97823"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/97823\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/97822"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=97823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=97823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=97823"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=97823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}