<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Linux Kernel on 备忘</title>
    <link>https://blog.witd.in/tags/linux-kernel/</link>
    <description>Recent content in Linux Kernel on 备忘</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <managingEditor>kongfei605@gmail.com (kongfei)</managingEditor>
    <webMaster>kongfei605@gmail.com (kongfei)</webMaster>
    <copyright>(c) 2022 witd. All rights reserved</copyright>
    <lastBuildDate>Tue, 16 Mar 2021 10:25:30 +0800</lastBuildDate>
    
	<atom:link href="https://blog.witd.in/tags/linux-kernel/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>sys.kernel.threads-max默认值</title>
      <link>https://blog.witd.in/2021/03/16/sys.kernel.threads-max%E9%BB%98%E8%AE%A4%E5%80%BC/</link>
      <pubDate>Tue, 16 Mar 2021 10:25:30 +0800</pubDate>
      <author>kongfei605@gmail.com (kongfei)</author>
      <guid>https://blog.witd.in/2021/03/16/sys.kernel.threads-max%E9%BB%98%E8%AE%A4%E5%80%BC/</guid>
      <description>&lt;h3 id=&#34;背景&#34;&gt;背景&lt;/h3&gt;

&lt;p&gt;物理机时代,业务根据&lt;code&gt;/proc/sys/kernel/threads-max&lt;/code&gt;设置线程池大小。容器（特指docker）该值仍然获取的是物理机上的信息，而容器规格一般比物理机小，再根据这个值获取信息设置容器内线程数就不准确了。物理机上这个值受哪些资源影响，因此有了这篇文章。&lt;/p&gt;

&lt;h3 id=&#34;梳理&#34;&gt;梳理&lt;/h3&gt;

&lt;p&gt;内核版本4.18 线程数限制为[20,0x3fffffff]&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://blog.witd.in/images/maxthreads/min_threads.png&#34; width=100%&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://blog.witd.in/images/maxthreads/max_threads.png&#34; width=100%&gt;
&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>