允许运行的最大线程数 [英] maximum number of threads allowed to run
本文介绍了允许运行的最大线程数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的linux系统中的最大线程数为93946.我从 cat/proc/sys/kernel/threads-max
获得此值.但是当我创建约32768个线程时,出现了错误
Maximum number of threads in my linux system is 93946.
I got this value from cat /proc/sys/kernel/threads-max
.
But when I create around 32768 threads I got error
cannot create new native threads
-
如何创建最大线程数(大约93946)?
How can I create maximum number of threads(around 93946)?
如果无法创建最大线程数(93946),如何找到允许运行的最大线程数?
If it is not possible to create maximum number of threads (93946), how can I find maximum number of threads allowed to run?
推荐答案
您可以使用以下命令找到最大线程数:
You can find max thread with command:
sysctl -a| grep kernel.threads-max
编辑
/etc/sysctl.conf
文件并添加新值kernel.threads-max = 93946
使用
sysctl -p
这篇关于允许运行的最大线程数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文