Subj : Re: Can I have more than one runtime to facilitate multiple threads? To : netscape.public.mozilla.jseng From : Brendan Eich Date : Tue Jul 01 2003 03:01 pm David Bradley wrote: > Consider, that if each thread's job is to process a JavaScript script. > And the system only has 4 cpu's, then having more than 4 or so will only > add to overhead, unless those scripts involve I/O. In that case, maybe > two times the cpu count is better. A lot hinges on the exact nature of > your system how much I/O vs CPU process is being done. Amdahl's law says that if 1/3rd of the program is serial, you can't speed up the program with more than 3 processors; etc. for 1/4 and 4 CPUs. It sounds like blocking i/o is involved (JS_SuspendRequest and JS_ResumeRequest), and enough of it that the suspend/resume contention for rt->gcLock seemed high (although it wasn't clear to me that that was more than a hunch). So yeah, it could be that there are simply too many threads being used here for the given target machine (which could be a uniprocessor). /be .