Forum OpenACS Q&A: Re: Tracking Memory Usage
several things to check:
- use a recent version of tcl 8.5
- are you running a 32bit or 64bit binary?
- do you make daily restarts?
- what tcl extensions are you using in which version?
- what openacs packages are you using?
- what is the rss and vmsize of nsd after startup and after one hour?
- what is the maxconnections in your aolserver configuration?
- have you set some especially large configuration values?
domNodes are a classical memleak, but one can as easy leak in namespaced variables, since these are not reclaimed at the end of a requests.
tcl is optimized for speed and not for memory space. try to avoid cases, where you read e.g. huge files into tcl vars and append to it. If the allocated memory is not sufficient (e.g. by one byte), tcl will realloc the memory with the double size.
aolserver has a few small memory leaks, naviserver is better in this regard. Compare the memory growth of openacs.org , which runs aolserver, with the size from next-scripting.org  which runs naviserver. If the traffic on your site is similar to openacs.org and you run a similar configuration, then the memory growth rate should be as well comparable to openacs.org.
One can do a lot with different memory allocators, but i am not sure this is necessary.