This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
Date: Thu, 16 Nov 2000 14:36:34 -0800 (PST) From: Nate Campi <nate@ceconsulting.com> To: mike rock <mrock@stewartsigns.com> Subject: Re: [svlug] threads On Thu, 16 Nov 2000, mike rock wrote: > I am a newbie and have a system that is quite slow from time to time for no > reason that I can determine. We are running RH6.1 and the comment on > threads intrested me,,, How do I determine how may threads are authorized > by the kernel and how do I increase that number?? I just recently had to tackle that problem at work. Here's what I found (of course I found it from a google search, you could do the same): Edit /usr/include/linux/tasks.h Look for the line that looks like this: #define NR_TASKS 512 /* On x86 Max 4092, or 4090 w/APM configured. */ Change 512 to some nice number like 2048. When I tried 4092, the system wouldn't boot, even though APM wasn't enabled in the BIOS or under Linux (I dunno). I _did_ get 4090 to boot, though, and the web server that was maxing out on processes was much happier. Did I mention that you have to recompile your kernel after you change this? Of course you already knew that ;) You might have to make ulimit changes and or changes to whatever app you want to take advantage of the new limit (maxclients on apache for example). Just remember that when you build this new kernel, you might not want to make it the default until you know it works. "lilo -R image_name" works great for remote systems, then if it doesn't boot, have someone near it just power cycle it, and it'll reboot with the (presumably good) default kernel. Nate P.S. Of course I highly doubt that this is what's causing your slowdowns. If it was, you'd be getting the infamous "can't fork" error when you tried to execute programs. If you find yourself having to "exec" programs to get them to run, that's a sign that you might need to up your process limit ;) === Date: Thu, 16 Nov 2000 14:50:04 -0800 To: Svlug <svlug@svlug.org> Subject: Re: [svlug] Threads From: Rick Moen <rick@linuxmafia.com> begin kevin@ank.com quotation: > I don't know of any version of unix that has denial of service protection > for process creation requests. You need to look up the limits.conf file syntax, specifically on control items "nproc" (max number of processes), "nofile" (max. number of open files), and so on. Start here: http://www.kernel.org/pub/linux/libs/pam/ ===