On Wed, Mar 26, 2003 at 05:00:07AM -0500, Gianni Johansson wrote: > Matthew Toseland wrote: > >On Mon, Mar 24, 2003 at 10:34:48PM -0800, Tracy R Reed wrote: > > > >>On Tue, Mar 25, 2003 at 05:34:19AM -0500, Gianni Johansson spake thusly: > >> > >>>Has anyone definitively tracked down the source of the CPU load issue? > >>> > >>>If not, what are the best hypotheses? > >> > > > >Threads. Threads. Threads. And did I mention threads? > > > > What do you mean? Thread creation should be minimized by the thread pooling.
I mean context switching. We have heard from other people who have used java with very many threads, saying that the context switching overhead is actually a big part of the slowness. Anyway, java provides various profiling tools... if you set cpu=samples, you get timings including idle time waiting for IO, but it's fast. If you set cpu=times, you get actual CPU times... this should identify any bottlenecks. Last I looked most of the top seemed to be dominated by crypto, but you are welcome to try. java -Xrunhprof:cpu=samples,file=freenet.prof,cutoff=0.0000001 freenet.node.Main --
pgp00000.pgp
Description: PGP signature