On Wed, 23 May 2001, Russell Coker wrote: > Your kernel source is not corrupted, things are being done differently in > 2.4.x. > > Here's some code from fork.c: > max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 2;
Owwww damn, is it _still_ doing that ? > So for my P3 laptop with 256M of RAM I'll have something like > 16000 processes maximum. > > I have attached a program I wrote to test this. After about > 4300 processes my machine started running extremely slow As expected, at this time not only has over 1/4th of system memory been taken by the task_struct's for those processes, but unswappable memory is also being used for the page directory (1 page per proc), the page tables (most likely 3 pages per proc), file descriptors, address space structures, etc... In short, memory has just about filled up with kernel structures. A while ago I already proposed lowering the limit to something like "max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 10;" exactly to prevent problems like this. Expect a patch to go to Linus and Alan later today. Another alternative would be real task swapping, but that's a 2.5 thing ;) regards, Rik -- Linux MM bugzilla: http://linux-mm.org/bugzilla.shtml Virtual memory is like a game you can't win; However, without VM there's truly nothing to lose... http://www.surriel.com/ http://www.conectiva.com/ http://distro.conectiva.com/

