From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,4b9ff8efa3fbc0af X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2002-11-06 15:24:20 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!news-out.newsfeeds.com!propagator2-maxim!news-in.spamkiller.net!feed.newsfeeds.com!cyclone-sf.pbi.net!64.245.249.51!sfo2-feed1.news.algx.net!allegiance!news-out.spamkiller.net!propagator-la!news-in.superfeed.net!newsfeed-east.nntpserver.com!nntpserver.com!feed.cgocable.net!feed.tor.primus.ca!news.primus.ca!53ab2750!not-for-mail Message-ID: <3dc9a4d2_1@news.iprimus.com.au> From: Philip Yarra Subject: Re: JDK 1.4.0-1 memory problems Newsgroups: comp.unix.tru64 References: <3dc22636_1@news.iprimus.com.au> User-Agent: KNode/0.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Original-NNTP-Posting-Host: 210.50.235.174 Organization: iPrimus Customer - reports relating to abuse should be sent to abuse@iprimus.com.au X-Original-NNTP-Posting-Host: 127.0.0.1 Date: Thu, 07 Nov 2002 10:23:24 +1100 NNTP-Posting-Host: 203.134.67.67 X-Complaints-To: news@primus.ca X-Trace: news.primus.ca 1036625020 203.134.67.67 (Wed, 06 Nov 2002 18:23:40 EST) NNTP-Posting-Date: Wed, 06 Nov 2002 18:23:40 EST Xref: archiver1.google.com comp.unix.tru64:9078 Philip Yarra wrote: As a follow-up for those interested: Further playing with -Xss options yielded a fix. It seems the default thread stack size is a little too small for what I was trying to do. I am still convinced there is a flaw in the Compaq VM implementation - perhaps at small thread stack sizes the VM itself runs out of space, to the point where it cannot allocate memory to throw an exception? Anyway, running the app as follows: java -Xss2048k -Xnoprecompiledsys classname options seems to work pretty reliably. Bumping it up to -Xss4096k allows me to spin out to 20,000 threads simultaneously (well, of course it doesn't actually spin out 20,000 threads, but it is able to throw and catch OutOfMemoryErrors, which is what I want). I'm still unsure if such large thread stack size is good (I have read some doco that suggests it may impede performance) but it seems to work. Regards, Philip.