Be careful what you consider 'leaks'.
ColdFusion 4.5.1 uses the default Linux allocator (malloc) and
this allocator does not 'give back' memory once it is allocated.
Try it for your self:
main()
{
void *x = malloc(1024*1024*20); /* 20 Gig */
free(x);
sleep(100);
}
If you look at this program, it grows to 20 Gig and stays
there. This is universally true across all *default* Unix
malloc implementations.
What this means for 4.5.1 users:
If you run a template, and it uses a large amount of memory,
or the template calls Verity, or you make a Query which causes
the DB driver to use memory, this memory is correctly freed
(i.e. no leak) but the cfserver process will not shrink from
its high water mark. What will happen is that the memory
will get reused for later requests. Under load however, things
might not work so well.
Consider: Template A causes a 10MB file to be loaded in to
memory (CFFILE). It completes and frees the 10MB. Template
B now runs and allocates 50K and it still running. Template A
runs again, needs 10MB, but the space it used before is not
available (it has to be contiguous). So cfserver grows another
10MB in order to run Template A.
To determine if a template is causing CF to grow without bounds,
start the server fresh, run the template, and check the memory.
Repeat. If CF gets bigger each run, you should take a look at
what is happening in the template and start eliminating things.
If you get a reproducible test case, its time to call support.
The GOOD NEWS - CF 5.0 uses SmartHeap from MicroQuill software.
What this means for 5.0 users:
SmartHeap is tuned for maximum performance and scalability.
It has a feature called 'footprint reduction'. This means
that ColdFusion WILL give back large amounts of memory, if
this memory is not longer being used.
It also gives CF a HUGE performance boost in load situations.
Why? Because SmartHeap reduces (or eliminates) the locking
needed in for multi-threaded memory allocation.
Be aware that we have tuned the SmartHeap defaults for high load
performance, which means the 'reserve' pool of free memory is large
(10MB). You will have to exceed these limits in order to see CF
shrink its memory usage.
<plug>
You can find out more about CF on Unix/Linux if you attend my Macromedia
Developers Conference presentation: ColdFusion Performance Tuning on
Unix/Linux (SV206).
See http://www.allaire.com/conference/index.cfm for details.
</plug>
I hope this information helps.
--
Tom Jordahl
MacroMedia Server Development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-linux%40houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_linux or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.