Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Aug 2003 11:59:50 +0200
From:      Sheldon Hearn <sheldonh@starjuice.net>
To:        freebsd-java@FreeBSD.org
Subject:   Re: FreeBSD vs Windows 2000 "Advanced" Server
Message-ID:  <20030828095950.GE83970@starjuice.net>
In-Reply-To: <20030828094833.GA82970@chihiro.leafy.idv.tw>
References:  <20030828090512.GB83970@starjuice.net> <20030828090852.GC83970@starjuice.net> <20030828094833.GA82970@chihiro.leafy.idv.tw>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030828095950.GE83970>