Messages in this thread | | | Date | Fri, 20 Sep 2002 09:52:39 +0200 (CEST) | From | Ingo Molnar <> | Subject | Re: 100,000 threads? [was: [ANNOUNCE] Native POSIX Thread Library 0.1] |
| |
On Thu, 19 Sep 2002, Rik van Riel wrote:
> So, where did you put those 800 MB of kernel stacks needed for 100,000 > threads ?
With the default split and kernel stack we can start up 94,000 threads on x86. With Ben's/Dave's patch we can have up to 188,000 threads. With a 2:2 GB VM split configured we can start 376,000 threads. If someone's that desperate then with a 1:3 split we can start up 564,000 threads.
Anton tested 1 million concurrent threads on one of his bigger PowerPC boxes, which started up in around 30 seconds. I think he saw a load average of around 200 thousand. [ie. the runqueue was probably a few hundred thousand entries long at times.]
> If you used the standard 3:1 user/kernel split you'd be using all of > ZONE_NORMAL for kernel stacks, but if you use a 2:2 split you'll end up > with a lot less user space (bad if you want to have many threads in the > same address space).
the extreme high-end of threading typically uses very controlled applications and very small user level stacks.
as to the question of why so many threads, the answer is because we can :) This, besides demonstrating some of the recent scalability advances, gives us the warm fuzzy feeling that things are right in this area. I mean, there are architectures where Linux could map a petabyte of RAM just fine, even though that might not be something we desperately need today.
Ingo
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |