In a message dated 1/10/04 12:03:58 AM, [EMAIL PROTECTED] writes:


A dynamic content server tends to grow in our
experience, and I've always assumed that's because of heap
fragmentation problems - not necessarily leaks.  Just restart your
server once a day/week.



Yes -- memory fragementation is a problem in AOLserver which does lead to "large" processes.  Actually, it's more accurate to say we accept fragmentation as a side effect of Tcl's threaded memory allocator which is a per-thread, power-of-2 alloctor.  This allocator essentially eliminates deadly lock contention problems of most normal allocators but requires high overhead and leads to fragmentation.  You can peak into the current state of the allocator with the "ns_info pools" command.

It's possible to compile Tcl without the threaded allocator by editing Tcl's Makefile to remove the -DUSE_THREAD_ALLOC=1.  Then you could try alternate malloc packages which may provide better behavior for you app., i.e.:

normal config:
  ns_malloc -> Tcl_Alloc -> Tcl threaded allocator -- malloc/Tcl_Alloc not compatible

disabled config:
  ns_malloc -> Tcl_Alloc -> malloc -- you can pre-load some other malloc shared library


HORD is often cited as a good alternatiive:  http://www.cs.umass.edu/~emery/hoard/.  

-Jim
2">

Reply via email to