Re: [Q] cannot fork w/ 1000s of procs (but still mem avail.)

From: Rik van Riel (
Date: Tue Oct 09 2001 - 12:10:00 EST

On Tue, 9 Oct 2001, Till Immanuel Patzschke wrote:

> hopefully a simple question to answer: I get "cannot fork" messages on
> my machine running some 20000 processes and threads (1 master proc, 3
> threads), where each (master) process opens a socket and does IP
> traffic over it. Although there is plenty of memory left (4GB box, 2GB
> used, 0 swap), I get "cannot fork - out of memory" when trying to
> increase the number of procs. (If none of the procs does IP, I can
> start more [of course?!].) Anything I can do to increase the number of
> active processes using IP? Any kernel paramter, limit, sizing?

For efficiency reasons, the kernel and userspace have to share
the same 4GB virtual address area. By default this area is split
3:1, with 3GB virtual space available for user programs and 1GB
for the kernel.

I suspect in your case it may be worth it to change the kernel
to use 2GB of virtual address space for itself and only let
userspace have 2GB...



DMCA, SSSCA, W3C?  Who cares?  (volunteers needed)

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Oct 15 2001 - 21:00:26 EST