Forum OpenACS Q&A: starting less nsd interpreters by default

How can I configure aolserver to start up less nsd processes?  Seems
like it always starts five and then creates more as needed, which is
fine normally, but I'm running two virtual domains and want to
configure the less-trafficed one to only start up one or two nsds.  I
couldn't see a way to do this reading through config.txt; am I
missing something?
Collapse
Posted by Henry Minsky on
aolserver nsd is multithreaded, it only runs one process. What you see
(under linux 'ps' I am assuming) is multiple threads, for some reason they get printed out one per line as if they were separate processes (apparently threads and processes are two flavors of the same basic
object in Linux).  It's not like apache which actually spawns n listener processes that wait around.
The threads are very lightweight, they all share the same resources for the most part.
Collapse
Posted by Jonathan Ellis on
Thanks...  So what is the difference between "thread" and "interpreter," or are they really the same?
Collapse
Posted by Don Baccus on
In general, not the same, in AOLserver space, the same.  Threads are allocated a Tcl 8x interpreter, meaning there's a 1:1 relationship.

This is due to the fact that AOLserver was written explicitly to return dynamic pages.

(FastPath caching avoids this, but I have to admit to being unsure, still, as to exactly how this relates to [Open]ACS 4 stuff.

Collapse
Posted by carl garland on

TCL *interpeters* are embedded in the general AOLserver application that is much more. As a multithreaded application the server spawns many threads and most of the threads include the interpeter(not sure if all do). If you want to decrease the number of threads running if you set the parameters MINTHREADS and MAXTHREADS = 1 in the config file I think you may be able to reduce total number. I think default is MINTHREADS is 3 ... not sure though. If you set any scheduled procs or shutdown procs they will also get their own threads though.

BTW ... I was under the weather yesterday and spent all day watching TV and playing with your new site ... www.carnageblender.com ... Fun way to hack away the hours ... but I'm back to work now ...sigh
Collapse
Posted by Jonathan Ellis on
Who says you can't play carnageblender at work?  <looks over shoulder> :)
Collapse
Posted by Don Baccus on
So how come carnageblender's not listed in our "openacs sites" page?
Collapse
Posted by Jonathan Ellis on
'cause I don't know who to send mail to... I hoped whoever it is would see the bboard post.  Nobody else has added his as a comment and I didn't want to be the first...
Collapse
Posted by Don Baccus on
Try clicking on the "Add a link" link at the bottom of the page ...
Collapse
Posted by Jonathan Ellis on
Man, that's the dumbest I've felt in a long time. :)