Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 20 Sep 2002 03:40:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 20 Sep 2002 03:40:30 -0400 Received: from mx1.elte.hu ([157.181.1.137]:31122 "HELO mx1.elte.hu") by vger.kernel.org with SMTP id ; Fri, 20 Sep 2002 03:40:29 -0400 Date: Fri, 20 Sep 2002 09:52:39 +0200 (CEST) From: Ingo Molnar Reply-To: Ingo Molnar To: Rik van Riel Cc: Ulrich Drepper , linux-kernel Subject: Re: 100,000 threads? [was: [ANNOUNCE] Native POSIX Thread Library 0.1] In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1635 Lines: 37 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/