Last I heard the set of PIDs was limited to 32767 by default, and having
huge numbers of even idle processes tended to slow down the PID allocator
horribly.
(Also, kernel threads still need a kernel stack: that's 8Kb of memory you
won't see again. Not much by modern standard perhaps...)
Posted Apr 17, 2009 23:43 UTC (Fri) by njs (guest, #40338)
[Link]
The PID allocator supposedly got fixed a few years ago, around when NPTL landed. (Here's an interview with Ingo that confirms this: http://kerneltrap.org/node/517) And if the kernel needed thousands of threads for some reason, presumably it could tweak the kernel.pid_max sysctl itself...
But anyway, yeah, for ordinary systems the memory usage matters a little but not much.