>>> > > 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?
>> See
>http://java.sun.com/j2se/1.4/docs/tooldocs/solaris/javac.html#options>> Type java -X at the command line to see the -X options for a
> particular JVM.
>> -Xmx64m allocates a max heap size of 64M for the JVM -
> increase this to be greater than the memory required (as much
> as possible if this is the main application the box is
> running). The more memory you can give, the less often the
> garbage collector will need to kick in boosting performance
> quite a bit.
>> You should probably look into threadpooling also to cut out
> the Thread creation overheads which can be fairly high,
> especially on Linux.
>> Cheers,
> jr
>
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!