SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need to change the limits to the number of processes in Slackware 14, with the stock 32 bit kernel. Years ago this required a recompile of the kernel.
I am wondering if the (new) /proc feature (see how dated I am) or some other feature permits me to bump up the process limit on the fly.
Googling around, I find all kinds of reasons to have certain services limit the number of processes they can have, for security reasons, but I didn't stumble upon how to increase the limits for the kernel.
For completeness, you can change it temporarily by writing to /proc/syskernel/pid_max or permanently by adding:
kernel.pid_max = 4194303
to /etc/sysctl.conf. 4194303 is the maximum limit.
My upgraded-to-14 Slackware installation doesn't have a /etc/sysctl.conf, so I'm unsure what to do there. If creating one doesn't work then perhaps stuffing something like "sysctl -w kernel.pid_max=4194303" to rc.local, or perhaps "echo
>/proc/sys/kernel/pid_max 4194303" would work there as well. I dunno.
Good luck with it!
EDIT: When I tried the sysctl -w command on my 32-bit Slackware 14 it returned invalid argument errors for numbers > 32768.
On 9/16/06, darren kirby wrote:
> # sysctl -p
> error: "Invalid argument" setting key "kernel.pid_max"
You can find the answer in /usr/include/linux/threads.h.
PID_MAX_DEFAULT is defined as 0x8000 (32768) for most systems, and
PID_MAX_LIMIT is set to 4194304 *if* longs are larger than 4 bytes, or
PID_MAX_DEFAULT otherwise.
So if you are on a 32-bit system, you cannot set pid_max any larger
than PID_MAX_DEFAULT.
Thanks. How did you find that! I was looking all over stackoverflow, and found related stuff, but not that one. Looks like there might be another advantage of using a 64 bit kernel, if I understand the second part of your post correctly.
Since you asked, I googled this phrase "linux kernel process number limit" and took a couple of the first hits (the list is different now, it would be the 1st and 3rd hits, I think).
Yes, 32768 seems the max for 32-bit kernels. You _could_ change it in the kernel source, but _I_ wouldn't try it since the setting is the single highest bit in a 32-bit word. I'd view that as probably related to word size and think that I'd likely break hard to find stuff somewhere else in the kernel.
YMMV, of course, and more searching might turn up a different answer.
good luck!
EDIT: I found the info for the second (32-bit limit) part by googling: "linux pid_max 32768 invalid argument"
Edit2: Note that if increasing the number of threads per process instead of the number of processes itself would help then this will tell you how to do it (NB: I haven't): http://stackoverflow.com/questions/3.../344292#344292
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.