Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
[MUD-Dev] Re: OT: Java multithreading performance
Chris Gray wrote:
>
> [Vadim Tkachenko:]
>
> :Keep static vector of startup delays;
> :Calculate the average delay and print it (for every successful start);
> :while ( isEnabled() ) Thread.sleep( 1000 );
>
> Any kind of printing is likely to be comparatively very expensive. Good
> would be going to dev/null, best would be no I/O at all.
You've just hit it :-))
I have the logging routine implemented in such a way that it accepts the
messages and prints... well, makes them available to the final logging
device, in the thread runninh with background priority. When I ran this
est, I had to disable all that stuff because the log was becoming silent
after some number of threads (don't remember the exact number, though).
Although, the goal was to test the limits, so I should have had some
sort of logging, otherwise how do I know when it dies? It's possible to
catch the OutOfMemoryError, which I, frankly, expected more than hitting
a thread limit, but I have no clue what would be the system behavior if
JVM wouldn't be able to create the next thread - as far as I understand,
Java language specification doesn't determine the consequences.
> Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA
--
Still alive and smile stays on,
Vadim Tkachenko <vt#freehold,crocodile.org>
--
UNIX _is_ user friendly, he's just very picky about who his friends are
--
MUD-Dev: Advancing an unrealised future.
- Thread context:
- [MUD-Dev] Re: OT: Java multithreading performance,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Sat 16 May 1998, 17:16 GMT
- <Possible follow-up(s)>
- [MUD-Dev] Re: OT: Java multithreading performance,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Sun 17 May 1998, 17:16 GMT
- [MUD-Dev] Re: OT: Java multithreading performance,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Mon 18 May 1998, 17:17 GMT
- [MUD-Dev] Re: OT: Java multithreading performance,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Wed 20 May 1998, 13:49 GMT
[ Other Periods
| Other mailing lists
| Search
]