{"id":6413,"date":"2021-06-15T17:57:17","date_gmt":"2021-06-15T09:57:17","guid":{"rendered":"https:\/\/www.gbase8.cn\/?p=6413"},"modified":"2021-06-15T18:01:49","modified_gmt":"2021-06-15T10:01:49","slug":"linux-%e7%ba%bf%e7%a8%8b%e6%95%b0%e9%99%90%e5%88%b6%ef%bc%8csuseredhat%e7%ad%89","status":"publish","type":"post","link":"https:\/\/www.gbase8.cn\/en\/6413","title":{"rendered":"Linux \u7ebf\u7a0b\u6570\u9650\u5236\uff0cSuse,redhat\u7b49"},"content":{"rendered":"<p>\u672c\u6587\u4ecb\u7ecdLinux \u7ebf\u7a0b\u6570\u9650\u5236\uff0c\u53ea\u8981\u5728sysctl.conf\u548climits.conf\u4e24\u4e2a\u914d\u7f6e\u6587\u4ef6\u91cc\u3002\u53e6\u5916\u5728redhat 7.5+\u548csuse 12\uff0c\u53c8\u589e\u52a0\u4e86TaskMax\u9650\u5236\u3002<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Directory Navigation<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2acbdc007fe\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2acbdc007fe\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.gbase8.cn\/en\/6413\/#%E6%A3%80%E6%9F%A5%E6%96%B9%E6%B3%95\" >\u68c0\u67e5\u65b9\u6cd5<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.gbase8.cn\/en\/6413\/#%E4%BF%AE%E6%94%B9%E6%96%B9%E6%B3%95\" >\u4fee\u6539\u65b9\u6cd5<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.gbase8.cn\/en\/6413\/#%E5%8F%82%E8%80%83\" >\u53c2\u8003<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%A3%80%E6%9F%A5%E6%96%B9%E6%B3%95\"><\/span>\u68c0\u67e5\u65b9\u6cd5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/proc\/sys\/kernel\/threads-max\ncat \/proc\/sys\/vm\/max_map_count\ncat \/etc\/security\/limits.d\/90-nproc.conf \ncat \/proc\/sys\/kernel\/pid_max<\/code><\/pre>\n\n\n\n<p>\u4e5f\u53ef\u4ee5<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@localhost ~]# sysctl -a | grep -i thread\r\n<span class=\"has-inline-color has-luminous-vivid-orange-color\">kernel.threads-max = 62300<\/span>\r\nsysctl: reading key \"net.ipv6.conf.all.stable_secret\"\r\nsysctl: reading key \"net.ipv6.conf.default.stable_secret\"\r\nsysctl: reading key \"net.ipv6.conf.enp0s3.stable_secret\"\r\nsysctl: reading key \"net.ipv6.conf.lo.stable_secret\"\r\nsysctl: reading key \"net.ipv6.conf.virbr0.stable_secret\"\r\nsysctl: reading key \"net.ipv6.conf.virbr0-nic.stable_secret\"\r\nvm.nr_pdflush_threads = 0\r\n&#91;root@localhost ~]#\r\n\n&#91;root@localhost ~]# sysctl -a | grep -i pid\r\nkernel.cad_pid = 1\r\nkernel.core_uses_pid = 1\r\nkernel.ns_last_pid = 4786\r\n<span class=\"has-inline-color has-luminous-vivid-orange-color\">kernel.pid_max = 32768<\/span>\r\nsysctl: reading key \"net.ipv6.conf.all.stable_secret\"\r\nsysctl: reading key \"net.ipv6.conf.default.stable_secret\"\r\nsysctl: reading key \"net.ipv6.conf.enp0s3.stable_secret\"\r\nsysctl: reading key \"net.ipv6.conf.lo.stable_secret\"\r\nsysctl: reading key \"net.ipv6.conf.virbr0.stable_secret\"\r\nsysctl: reading key \"net.ipv6.conf.virbr0-nic.stable_secret\"\r\nuser.max_pid_namespaces = 31150\r\n&#91;root@localhost ~]#\r\n\n\n&#91;root@localhost ~]# ulimit -a\r\ncore file size          (blocks, -c) 0\r\ndata seg size           (kbytes, -d) unlimited\r\nscheduling priority             (-e) 0\r\nfile size               (blocks, -f) unlimited\r\npending signals                 (-i) 31150\r\nmax locked memory       (kbytes, -l) 64\r\nmax memory size         (kbytes, -m) unlimited\r\nopen files                      (-n) 1024\r\npipe size            (512 bytes, -p) 8\r\nPOSIX message queues     (bytes, -q) 819200\r\nreal-time priority              (-r) 0\r\nstack size              (kbytes, -s) 8192\r\ncpu time               (seconds, -t) unlimited\r\n<span class=\"has-inline-color has-luminous-vivid-orange-color\">max user processes              (-u) 31150<\/span>\r\nvirtual memory          (kbytes, -v) unlimited\r\nfile locks                      (-x) unlimited\r\n&#91;root@localhost ~]#\r\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E4%BF%AE%E6%94%B9%E6%96%B9%E6%B3%95\"><\/span>\u4fee\u6539\u65b9\u6cd5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/etc\/sysctl.conf\n\nvi \/etc\/security\/limits.conf\n\nvi etc\/security\/limits.d\/90-nproc.conf <\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8F%82%E8%80%83\"><\/span>\u53c2\u8003<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><a href=\"https:\/\/www.gbase8.cn\/en\/6012\/\">Suse 12\u548credhat 7.5+ \u4fee\u6539\u4efb\u52a1\u6570TasksMax\uff0cDefaultTasksMax\uff0cUserTasksMax\u7b49\u5168\u5c40\u3001\u7528\u6237\u7684\u914d\u7f6e<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/blog.csdn.net\/shy_snow\/article\/details\/106762604\">https:\/\/blog.csdn.net\/shy_snow\/article\/details\/106762604<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u4ecb\u7ecdLinux \u7ebf\u7a0b\u6570\u9650\u5236\uff0c\u53ea\u8981\u5728sysctl.conf\u548climits.conf\u4e24\u4e2a\u914d\u7f6e\u6587\u4ef6\u91cc\u3002\u53e6\u5916\u5728redhat 7.5+\u548csuse 12\uff0c\u53c8\u589e\u52a0\u4e86TaskMax\u9650\u5236<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[72],"class_list":["post-6413","post","type-post","status-publish","format-standard","hentry","category-1","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/6413","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/comments?post=6413"}],"version-history":[{"count":5,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/6413\/revisions"}],"predecessor-version":[{"id":6421,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/6413\/revisions\/6421"}],"wp:attachment":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/media?parent=6413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/categories?post=6413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/tags?post=6413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}