Forum .LRN Q&A: Re: forums admin portlet title upgrade: run out of memory!

Collapse
Posted by Gustaf Neumann on
1 GB of swap is not really much, but at least the machine will become slower (i.e. swapping) before it crashes :). Extending swap should help in the short range. Is the machine running as well the database? anyhow, 1 GB of real memory is not much for running 5 fully configured openas/dotlrn instances.

Concerning the parameters: i would recommend to comment out the minthreads line, and reduce maxthreads to 5. Note, that every thread gets a full copy of the blueprint (containing a tcl code from all -proc.tcl files). Every thread has its own tcl interpreter; once you are loading dotlrn, the threads are far from being lightweight.

Concerning the memory growth: when the server starts, only the bare minimum of threads is created. After some time the first scheduled procs are run (note that every repeating scheduled proc running in its own thread will use its own thread containing the full blueprint). Reducing the number of such scheduled procedures will help to reduce the memory consumption as well.

So when the server starts, you might have only a few threads running (e.g. 4 with main, driver, sched, 1 conn thread); when the first requests come in (for e.g. a page with some images) you are likely to have with your configuration 10 connection threads running (we are now at 13), if you run the full set of scheduled procs from all dotlrn packages, you might have 10 or even more scheduled threads) (we are now at 23 thread). So, it is not unlikely to use after some time 6 times the memory, even if one takes into account that zippy and tcl tend to over-allocate memory for speed reasons.

Hope, this explain a little the underlying mechanisms
-gustaf neumann