See previous note to AOLserver listserv as I just committed the code...

Might be some stuff of interest that would make sense to move back into the core. I'd also like to see modifications made to Tcl to make it much easier to plug in alternate allocators (Hoard, tcmalloc, etc.) where using those allocators makes the most sense. I think, as you mentioned, the current Tcl threaded allocator is optimized to be a high performance malloc, which is achieved by all but eliminating lock contention, but at the cost of higher memory usage.

If the exploratory work Jim and did showed anything, it's that it isn't very easy, or wise, to try and make the current allocator into a "one size fits all" solution - probably better to instead use the particular allocator which is best suited for your particular needs (high performance, low memory usage, etc.)

- n

[EMAIL PROTECTED] wrote:
I'm of course interested in seeing whatever variants of the threaded malloc
that are done.  The original was also provided (with thanks) by the folks at
AOL, designed on the original mods to threaded Tcl and high perf malloc for
it.

If this is all just refined improvement on the same, then it should go
straight back into the Tcl core.

  Jeff Hobbs, The Tcl Guy, http://www.ActiveState.com/

Jim Davidson wrote:
Folks,

Nate and I spent a lot of time -- frankly, far too much time -- chasing this down a few months back. We ended up completely re- writing the multi-threaded allocator with features to reclaim memory, fix stats counters which in the current code are broken and lie, and added an "alloc" command with all sorts of fun introspection features, and some monitoring adp pages. Nate will post it for folks to try if interested -- consider it interesting but experimental :)

-Jim



On Jun 2, 2006, at 2:37 PM, Guan Yang wrote:

Thanks,

What values would you suggest for NBUCKETS and MAXALLOC?

And looking at tclThreadAlloc.c, I'm not quite sure how to make the
spacing closer.

Guan

On 2 Jun  2006, at 19:28 , Jeff Rogers wrote:

I think one difference is in the tcl version itself;  the latest
versions use a fast multithreaded allocator that allocates on average slightly more than double the amount requestes, while earlier versions may have been more frugal. You can cut your memory usage by a third or more by increasing the number of buckets defined in tclThreadAlloc.c and making the spacing closer; there will be a bit more constant overhead and the allocator would run microscopically slower. You may also want to look into the ttrace module which makes all the tcl interpreters lazily load their code instead of loading everything up front which can be a significant savings but I have had very little luck with it (I think the openacs code does too many fancy things to work well with it).

-J

Guan Yang wrote:
Hi,
A couple of weeks ago I moved a number of servers to AOLserver
4.0.10 from various versions of 3.4 because of the 10^9 seconds problem. After the move servers that were preivously using 100-120 MB of memory are now using around 300 MB to 400 MB each. I've tried to turn off or reduce adp and fastpath caches, reducing maxthreds to the 40's level. Stacksize is 500k. We have used more or less the same config files, with a few changes like the new nsopenssl configuration format. Has anyone else had experiences with memory usage after switching to AOLserver 4.0, and is there any easy way to reduce it?
Thanks,
Guan


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to