[ILUG] anyone have any experience of java thread problems on linux ?

Nick Murtagh murtaghn at tcd.ie
Wed May 8 15:14:08 IST 2002


On Wednesday 08 May 2002 14:46, Hunt, Bryan wrote:
> I think the NGPT is in kernel 2.5.something we need to be running a stable
> kernel so this is not an option. Thousands of threads are an absolute must

yeah. 2.5 is not usable yet...

> for this application as it must support thousands of simultaneous
> connections and each connection will use blocking io (not our choice).
> Actually I think the advice about reducing the number of threads is a bit
> of a
> cop out (not on your part nut in general) you should be free to use the
> system resources to the max if need be without the restraints of hard coded
> limits.

At that number of threads, I'd imagine that scheduling overhead would actually
become a significant waste of resources, especially with java. Are you using
Ingo Molnar's O(1) scheduler? It's probably a good idea for this sort of 
setup.

> I temporarily changed the ulimit settings to be as so ....

> max user processes            (-u) unlimited

> Ran the test again and got identical results.

Ah crap...

> I should have mentioned that
> The machine has 320 mb of ram and the test program was run as
>
> java -Xms32m -Xmx64m TestThreads 1200

What do those -X flags do? Are you sure you're not using all the memory?
How much swap do you have? Is it being used?

Take a look at this web page (you may need to patch the kernel):

  http://www.jguru.com/faq/view.jsp?EID=237189

Nick




More information about the ILUG mailing list