Re: problem with running out of processes

Alex Buell (alex.buell@tahallah.demon.co.uk)
Tue, 23 Feb 1999 23:34:06 +0000 (GMT)


On Tue, 23 Feb 1999, Brian Gerst wrote:

> Each process takes up 8k of non-swappable kernel memory for the kernel
> stack and process structure. This is allocated dynamically (which can
> cause problems if memory is fragmented, becuase the 8k needs to be
> contiguous). If all 4092 processes are running this is almost 32Mb.
> Double trouble for low-memory machines.

Now I understand a bit more. Thank you for your explanation. However, I've
been messing with tasks.h a bit more.

It looks like my machine will *not* boot if I set NR_TASKS to 4092 (as
instructed), or 4090. However, setting it to 4000 works fine. And, no I
don't have APM configured. I have it permanently switched off as I figure
I can bloody well turn off the monitor 8)

> The reason the hard limit is at 4092 or 4090 is each process needs 2
> entries in the GDT (Global Descriptor Table): a TSS (Task State Segment)
> and an LDT (Local Descriptor Table). The way LDT descriptors are shared
> now, one LDT per process is unnecessary, and should be changed to leave
> more room for TSS descriptors. There are also 8 descriptors used by the
> kernel, 10 if APM is enabled).

I have seen a new kernel thread in the system that I have not seen before.
This is the kpiod thread. I wonder if I just should try again, and set
NR_TASKS to 4089, and see if it pukes.

BTW, top dies with a message "Too many tasks! HELP!" if I exceed a certain
number of processes. =) Fun. I'm trying to find out what that limit is.

Cheers,
Alex

--
 /\_/\  Legalise cannabis now! 
( o.o ) Grow some cannabis today!
 > ^ <  Peace, Love, Unity and Respect to all.

http://www.tahallah.demon.co.uk - Now back in the United Kingdom!

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/