Am 02.01.14 19:02, schrieb John Buckman:
Hi Gustaf,
I found today your great article on alternative mallocs:
https://next-scripting.org/xowiki/docs/misc/thread-mallocs/index1
could you possibly let me know what the correct way is to build Tcl
and Naviserver with tcmalloc?
In order to avoid tcl's zippy malloc, one has to patch the tcl sources,
since
practically every malloc from tcl and naviserver happens finally through
Tcl's ckalloc(), which does not call the system malloc(), but its own
implementation (in a threaded case, this is zippy malloc).
Therefore a patch is required to make tcl call malloc(), and then one can
use the either the "system malloc" shipped with your OS or
one of the various malloc() implementation out there "on the market".
I'll send you a patch for tcl 8.5 in a separate mail. Apply this to the
tcl sources, recompile and install, and use the resulting tcl library
for linking against naviserver.
then one can use e.g.
export LD_PRELOAD=/usr/lib64/libtcmalloc.so
to use TCMalloc for naviserver
all the best
-gustaf
My way to do it, was the modify the Tcl Makefile like so:
LDFLAGS = $(LDFLAGS_DEBUG) -Wl,--export-dynamic
-ltcmalloc
but that way doesn't carry the -ltcmalloc through to tclConfig.sh, and
so loadable extensions aren't built with tcmalloc, and so I suspect
that my way wasn't the right way to do it.
Or should I just hand-modify the Naviserver makefile, and tclConfig.sh
to have that -ltcmalloc line on it?
As to your question about stability of naviserver, I see now that I
had previously built Naviserver using the Tcl binaries from ActiveTcl
and I suspect that's the problem. I'm in the process of rebuilding
entirely from source.
I *have* successfully been using naviserver as a staging server, and
for development for the past 6 months. There's lots to love.
My config file is lightweight, just a slight mod from one of the
samples I found from naviserver. My hunch of the source of the
problem is that binary ActiveTcl distribution. I'm using Tcl 8.5.15
-john
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel
--
Univ.Prof. Dr. Gustaf Neumann
WU Vienna
Institute of Information Systems and New Media
Welthandelsplatz 1, A-1020 Vienna, Austria
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel