From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Earle R. Nietzel" Subject: Re: How do I increase threads per user? Date: 17 Apr 2003 17:48:14 +0200 Sender: linux-smp-owner@vger.kernel.org Message-ID: <1050594494.27761.4.camel@home> References: <200304171514.h3HFEc1j015621@bach.leonora.org> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200304171514.h3HFEc1j015621@bach.leonora.org> List-Id: Content-Type: text/plain; charset="us-ascii" To: "Vladimir G. Ivanovic" Cc: da_alchemist@yahoo.com, linux-smp On Thu, 2003-04-17 at 17:14, Vladimir G. Ivanovic wrote: > I compiled and ran the code you submitted below. All it does is count up > the number of threads that it has created: > > [160000+ lines of output deleted for brevity's sake] > Time's up! > Thread #85321 scheduled. > Time's up! > Thread #85322 scheduled. > Time's up! > Thread #85323 scheduled. > Time's up! > Thread #85324 scheduled. > Time's up! > Thread #85325 scheduled. > ^C <-- I got bored here > > Perhaps you intended to have something other than 0 as the argument to > the constructor of Reminder. Using 30, I can create ~1400 threads before > the VM crashes (Red Hat 8.0, 2.4.18-27smp, glibc 2.2.93cw, Sun Java > 1.4.1_02). Using 30 I created ~3660 threads before the VM crashed with an OutOfMemory exception (RedHat 9, 2.4.20-9smp, Sun Java 1.4.1_02). Remember you also have to think about how the kernel splits up memory for user space and kernel space, I don't know how java implements its thread environment so I can't speak intelligently on the subject. -- Earle R. Nietzel