[MUD-Dev] OT: Java multithreading performance

Vadim Tkachenko vt at freehold.crocodile.org
Sat May 16 00:10:35 New Zealand Standard Time 1998


Hello,

If this information is even more offtopic than I think, just let the
thread die - the only reason I'm posting it here is I remember some
people were concerned about Subj and some others were considering Java
server side.

So, that was the noise, the signal is:

Test algorithm:

record the time;
fire the thread;
wait until it's started; 
record the interval between the creation time and this moment;
wait 100 ms;
fire another;
perform something in the current thread.

gives somewhat unexpected results:

- It's possible to have 3400 threads running at a time (in fact, those
objects were more heavy than threads, they were GenericServices I
mentioned before), response is miserable, but it still runs.
- Performance degradation starts showing up at approximately 1000
threads, the curve is rather exponential after that
- Before 1000 threads, the graph is rather flat. The reason for that may
be that the interval dispersion is less than the visible interval on the
resulting graph.

Well, now I'm thinking about measuring the actual performance within
each thread too, but it's too late for this week, so the question here
is:

- Did anybody perform the tests like this?
- Am I reinventing the wheel, are there standard tests which measure the
multithreading performance?
- How many threads working acceptable did you have, as a peak value (not
only Java, any environment)?
- Any other comments?

BTW, operating conditions were:

P2/300, 128M running Linux & JDK 1.1.3 - no significant impact on other
programs, except load very close to 1 (for obvious reasons)

On Windows 95 machine, it started to slow the computer down after
approximately 500 threads, and the guy who was performing the test lost
his temper and killed it, so I can't reproduce the graph for that.

No chance to run it on NT, also, couldn't compare Sun & MS JVM
performance.

--
Still alive and smile stays on,
Vadim Tkachenko <vt at freehold.crocodile.org>
--
UNIX _is_ user friendly, he's just very picky about who his friends are

--
MUD-Dev: Advancing an unrealised future.



More information about the MUD-Dev mailing list