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

Re: maximum number of processes on kernel 2.4.x



On Mon, 11 Mar 2002 22:52, Wayne Tucker wrote:
> Does anybody know how to change the maximum number of tasks/processes
> available under the 2.4.x kernels, similar to tuning NR_TASKS and
> MAX_TASKS_PER_USER in 2.2.x and 2.3.x?  Our mail software sometimes
> requires a large number of processes, and we cannot ssh into the server
> once the number of processes belonging to root reaches 256.
>
> Thanks for any help that you can provide,

Below is the relevant section of fork.c in kernel 2.4.18.  Whether having 
half the system memory being used by non-swappable kernel data structures can 
be considered "safe" is a matter of opinion.  But I don't think that running 
out of process table space will be a problem for you (your machine will 
probably be dead before you get there).

I guess that you have some problem related to ulimit...

void __init fork_init(unsigned long mempages)
{
        /*
         * The default maximum number of threads is set to a safe
         * value: the thread structures can take up at most half
         * of memory.
         */
        max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 8;

        init_task.rlim[RLIMIT_NPROC].rlim_cur = max_threads/2;
        init_task.rlim[RLIMIT_NPROC].rlim_max = max_threads/2;
}

-- 
If you send email to me or to a mailing list that I use which has >4 lines
of legalistic junk at the end then you are specifically authorizing me to do
whatever I wish with the message and all other messages from your domain, by
posting the message you agree that your long legalistic sig is void.



Reply to: