You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_tcl-dev@tcl.apache.org by "David N. Welton" <da...@dedasys.com> on 2002/12/03 21:07:22 UTC
Re: threads?
Michael Link <ml...@synthemesc.com> writes:
[ Been away for Thanksgiving... hope you had a good one too. ]
> Apache's threading models already do the work for us. It creates a
> pool of threads to use (similar again to perchild method, just
> threads instead of processes). So all that would need to be done is
> to create an interpreter for each thread, and it will automatically
> be pseudo-pooled for us.
Ok, but what about the shared resources, and interpreter creation
time? I mean, for a normal mod_tcl (or Rivet) you can have it so that
the interpreter that the page is getting is ready to go with all the
goodies loaded and byte-compiled. Losing that would suck.
> If the interpreters are pooled and the threads are pooled, that's a
> lot of pools and potentially another bottleneck. If there are 20
> threads and only 5 interpreters and the site gets slammed by 20
> clients then 15 clients have to wait an unknown amount of time,
> maybe dependent on the keepalive setting also?
More than anything, I suppose this is just kind of ugly and confusing,
so the simplest thing would be to keep it to one interpreter per
thread, and try and keep the number of threads low.
--
David N. Welton
Consulting: http://www.dedasys.com/
Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
Apache Tcl: http://tcl.apache.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: mod_tcl-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: mod_tcl-dev-help@tcl.apache.org