FreeBSD vs Windows 2000 "Advanced" Server
Sheldon Hearn
sheldonh at starjuice.net
Thu Aug 28 02:59:55 PDT 2003
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 at 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.
More information about the freebsd-java
mailing list