In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces how to modify the maximum number of processes in linux, the content is very detailed, interested friends can refer to, hope to be helpful to you.
1. Threads-max (/ proc/sys/kernel/threads_max)
This value represents the upper limit of the number of system processes determined by physical memory. In fork_init, there are:
Max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 8
2. Pid_max (/ proc/sys/kernel/pid_max)
This value represents the upper limit of the process ID. To be compatible with older versions, the default is 32768 (that is, two bytes).
Echo 4194303 > / proc/sys/kernel/pid_max
3. RLIMIT_NPROC (ulimit-u or getrlimit)
This value represents the maximum number of processes allowed by a single user. The system defaults to half of threads-max:
Init_ task.rlim.rlim _ cur = max_threads/2;init_ task.rlim.rlim.rlim _ max = max_threads/2
Experiment:
In a certain environment:
Threads-max = 139264
Pid_max = 32768
RLIMIT_NPROC = 69632
1. At this time, the root user continues to create processes, and finally creates about 32378, which is close to the value of pid_max considering the original number of processes.
2. When the pid_max is changed to 18000, 17612 processes are finally created.
3. Change the pid_max to 80000 and replace it with ordinary users. Finally, 67913 processes are created.
What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
On how to modify the maximum number of processes in linux to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.