[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: max concurrent processes can't be > 257?



on Fri, May 04, 2001 at 07:41:47AM -1000, Joseph Dane (joe@hotu.com) wrote:
> >>>>> "Nate" == Nate Amsden <aphro@portal.aphroland.org> writes:
> 
>  Nate> Brett wrote:
>  >>  I'm running qmail and am trying to set up linux to allow for
>  >> hundreds of outgoing connections at once (no, I'm not a spammer
>  >> but the new admin of some very large, dynamic mailing lists). I'm
>  >> using Debian Linux 2.2.18pre21 and from what I read, it should be
>  >> quite possible to adjust the maximum processes per user through
>  >> 'limit' (or 'ulimit' depending on the shell) rather than adjusting
>  >> and recompiling the kernel. Well, I'm root, I do the adjustments
>  >> to limit ('limit maxproc 1000') but when I check the logs, qmail
>  >> never gets above 257 concurrency (256 is the default limit of
>  >> maxproc). I do a 'limit'
> 
>  Nate> probably because you did not restart qmail *using the shell
>  Nate> with the modified ulimits*.
> 
> probably you are correct.  however, there is another possibility: the
> limitation on the total number of processes allowed by the kernel.
> 
> <warning msg="I am not a kernel hacker">
> 
> check out the kernel include file include/linux/tasks.h.  (this is
> assuming you are running some sort of 2.2.x kernel.)  you will see
> two lines like the following:
> 
> #define NR_TASKS        2048    /* On x86 Max 4092, or 4090 w/APM configured. */
>  
> #define MAX_TASKS_PER_USER (NR_TASKS/2)
> 
> on my debian potato system, the first line was set to something much
> smaller than the value above.  memory may be failing me, but I think
> it was initially set to 512.  which would make 
> MAX_TASKS_PER_USER == 256.

Thanks.  I'd gone looking for this yesterday but hadn't found it.

> I ran into this when I had a Java program that was unable to spawn
> more than 256 threads.  after increasing NR_TASKS, all was well.  I
> also initially suspected ulimit, but found that making everything
> unlimited did not solve the problem.  a recompiled kernel with the
> above changes did.
> 
> finally, I am not sure that the above is the "authorized" way of
> increasing the maximum number of processes in a linux kernel.  

It's a build option, AFAIK.

-- 
Karsten M. Self <kmself@ix.netcom.com>    http://kmself.home.netcom.com/
 What part of "Gestalt" don't you understand?       There is no K5 cabal
  http://gestalt-system.sourceforge.net/         http://www.kuro5hin.org

Attachment: pgpqhPsnp9Lsg.pgp
Description: PGP signature


Reply to: