From owner-freebsd-java@FreeBSD.ORG Thu Aug 28 02:59:54 2003 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D8AB116A4BF for ; Thu, 28 Aug 2003 02:59:54 -0700 (PDT) Received: from axl.seasidesoftware.co.za (axl.seasidesoftware.co.za [196.31.7.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57C8143FA3 for ; Thu, 28 Aug 2003 02:59:53 -0700 (PDT) (envelope-from sheldonh@starjuice.net) Received: from sheldonh by axl.seasidesoftware.co.za with local (Exim 4.22) id 19sJZG-000MP0-Ba for freebsd-java@FreeBSD.org; Thu, 28 Aug 2003 11:59:50 +0200 Date: Thu, 28 Aug 2003 11:59:50 +0200 From: Sheldon Hearn To: freebsd-java@FreeBSD.org Message-ID: <20030828095950.GE83970@starjuice.net> Mail-Followup-To: freebsd-java@FreeBSD.org References: <20030828090512.GB83970@starjuice.net> <20030828090852.GC83970@starjuice.net> <20030828094833.GA82970@chihiro.leafy.idv.tw> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030828094833.GA82970@chihiro.leafy.idv.tw> User-Agent: Mutt/1.5.4i Sender: Sheldon Hearn Subject: Re: FreeBSD vs Windows 2000 "Advanced" Server X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2003 09:59:55 -0000 On (2003/08/28 17:48), leafy wrote: > > > The test class at the bottom of this message can fire about 1,800 [1] > > > threads on my FreeBSD 5.1-CURRENT box, with the native jdk-1.4.1. My > > > box is a PIII with 1G of RAM. > What is your sleep time settings? I can get to > leafy@chihiro:~/tmp$ java TestThreads 50000 10 > TestThreads: successfully fired 50000 threads > TestThreads: waited 10 milliseconds for all threads to complete > > But my box is a P4-1.8G with 256MB RAM, lengthing the sleeptime to 10,000 ms > also works, but drags my box down to nearly a halt. That's because memory is allocated for the stack of each thread. You don't have a lot of memory. Using a low sleep time means that you're not really keeping the threads alive long enough to have them all alive at once. I use 20000 as my sleep time. My box doesn't crawl, but I have 1G of memory. :-) Ciao, Sheldon.