OK, all the valgrind'ing I've been doing has been with the memcheck tool. Now, I'm going to try a run with the "massif" valgrind tool which does a sample-based heap analysis. Here's the output:
$ LD_LIBRARY_PATH=lib valgrind --tool=massif --depth=5 --alloc-fn=g_malloc
--alloc-fn=g_realloc --alloc-fn=g_try_malloc --alloc-fn=g_malloc0
--alloc-fn=g_mem_chunk_alloc --trace-children=yes bin/nsd -ft test-config.tcl
-u www -g www
==1252== Massif, a space profiler for x86-linux.
==1252== Copyright (C) 2003, Nicholas Nethercote
==1252== Using valgrind-2.2.0, a program supervision framework for
x86-linux.
...
==1252==
==1252== Total spacetime: 9,229,237,698 ms.B
==1252== heap: 98.2%
==1252== heap admin: 0.2%
==1252== stack(s): 1.5%
I hit the server with only 100 requests this time, to keep the runtime
short.
The massif.* output files are attached to this email. I converted the
PostScript that Massif outputs to PDF so that everyone will be able to
view the graph.
Neither the .txt file nor the PDF graph are giving me any better
understanding: if any of you see something in the tea leaves, please
tell me.
Here's a good article that talks about Massif:
http://developer.gnome.org/doc/guides/optimisation/Massif.html
I guess the next step is to rebuild Tcl/AOLserver with
--enable-symbols=mem and see if I get a clearer picture in Valgrind that
way. And if that fails, next week, attempt to run everything under
Purify, which I'm not really looking forward to ...
-- Dossy
--
Dossy Shiobara mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)
--
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.
Command: bin/nsd -ft test-config.tcl -u www -g www == 0 =========================== Heap allocation functions accounted for 98.2% of measured spacetime Called from: 83.9% : 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) 11.6% : 0x3AA8029C: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 1.1% : 0x3AA805A0: TclThreadAllocObj (in /usr/lib/libtcl8.4.so.0) 0.9% : 0x3AA804BD: TclpRealloc (in /usr/lib/libtcl8.4.so.0) 0.5% : 0x3AA80016: (within /usr/lib/libtcl8.4.so.0) and 34 other insignificant places == 1 =========================== Context accounted for 83.9% of measured spacetime 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) Called from: 83.9% : 0x3AA80286: TclpAlloc (in /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 11.6% of measured spacetime 0x3AA8029C: TclpAlloc (in /usr/lib/libtcl8.4.so.0) Called from: 11.5% : 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) and 1 other insignificant place --------------------------------- Context accounted for 1.1% of measured spacetime 0x3AA805A0: TclThreadAllocObj (in /usr/lib/libtcl8.4.so.0) Called from: 1.1% : 0x3AA709A8: Tcl_NewObj (in /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 0.9% of measured spacetime 0x3AA804BD: TclpRealloc (in /usr/lib/libtcl8.4.so.0) Called from: 0.5% : 0x3AA26025: Tcl_AttemptRealloc (in /usr/lib/libtcl8.4.so.0) and 1 other insignificant place --------------------------------- Context accounted for 0.5% of measured spacetime 0x3AA80016: (within /usr/lib/libtcl8.4.so.0) Called from: 0.5% : 0x3AA802B2: TclpAlloc (in /usr/lib/libtcl8.4.so.0) and 1 other insignificant place == 2 =========================== Context accounted for 83.9% of measured spacetime 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) 0x3AA80286: TclpAlloc (in /usr/lib/libtcl8.4.so.0) Called from: 88.0% : 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) 42.4% : 0x3AA80427: TclpRealloc (in /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 11.5% of measured spacetime 0x3AA8029C: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) Called from: 11.2% : 0x3A9EAFAE: ns_malloc (memory.c:67) and 1 other insignificant place --------------------------------- Context accounted for 1.1% of measured spacetime 0x3AA805A0: TclThreadAllocObj (in /usr/lib/libtcl8.4.so.0) 0x3AA709A8: Tcl_NewObj (in /usr/lib/libtcl8.4.so.0) Called from: 1.1% : 0x3AA91E1F: TclpInitLibraryPath (in /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 0.5% of measured spacetime 0x3AA804BD: TclpRealloc (in /usr/lib/libtcl8.4.so.0) 0x3AA26025: Tcl_AttemptRealloc (in /usr/lib/libtcl8.4.so.0) Called from: 0.5% : 0x3AA7EDF8: Tcl_AttemptSetObjLength (in /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 0.5% of measured spacetime 0x3AA80016: (within /usr/lib/libtcl8.4.so.0) 0x3AA802B2: TclpAlloc (in /usr/lib/libtcl8.4.so.0) Called from: 0.5% : 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) == 3 =========================== Context accounted for 88.0% of measured spacetime 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) 0x3AA80286: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) Called from: 37.6% : 0x3A9EAFAE: ns_malloc (memory.c:67) 13.3% : 0x3AA7EB70: Tcl_SetObjLength (in /usr/lib/libtcl8.4.so.0) 10.6% : 0x3AA597A7: (within /usr/lib/libtcl8.4.so.0) 7.8% : 0x3AA84B35: Tcl_DStringSetLength (in /usr/lib/libtcl8.4.so.0) 7.0% : 0x3AA69AD1: (within /usr/lib/libtcl8.4.so.0) 4.3% : 0x3AA7E60A: Tcl_NewStringObj (in /usr/lib/libtcl8.4.so.0) 1.5% : 0x3AA43ED6: (within /usr/lib/libtcl8.4.so.0) 1.4% : 0x3AA5930B: Tcl_CreateChannel (in /usr/lib/libtcl8.4.so.0) 1.4% : 0x3AA69E86: TclRegisterLiteral (in /usr/lib/libtcl8.4.so.0) 1.4% : 0x3AA6982B: (within /usr/lib/libtcl8.4.so.0) 1.2% : 0x3AA84995: Tcl_DStringAppend (in /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 42.4% of measured spacetime 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) 0x3AA80286: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA80427: TclpRealloc (in /usr/lib/libtcl8.4.so.0) Called from: 32.1% : 0x3AA25F4B: Tcl_Realloc (in /usr/lib/libtcl8.4.so.0) 10.3% : 0x3AA26025: Tcl_AttemptRealloc (in /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 11.2% of measured spacetime 0x3AA8029C: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) 0x3A9EAFAE: ns_malloc (memory.c:67) Called from: 6.9% : 0x3A9EB088: ns_strdup (memory.c:102) 4.2% : 0x3A9EB004: ns_calloc (memory.c:85) and 1 other insignificant place --------------------------------- Context accounted for 1.1% of measured spacetime 0x3AA805A0: TclThreadAllocObj (in /usr/lib/libtcl8.4.so.0) 0x3AA709A8: Tcl_NewObj (in /usr/lib/libtcl8.4.so.0) 0x3AA91E1F: TclpInitLibraryPath (in /usr/lib/libtcl8.4.so.0) Called from: 1.1% : 0x3AA458CB: (within /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 0.5% of measured spacetime 0x3AA804BD: TclpRealloc (in /usr/lib/libtcl8.4.so.0) 0x3AA26025: Tcl_AttemptRealloc (in /usr/lib/libtcl8.4.so.0) 0x3AA7EDF8: Tcl_AttemptSetObjLength (in /usr/lib/libtcl8.4.so.0) Called from: 0.5% : 0x3AA7F4E2: (within /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 0.5% of measured spacetime 0x3AA80016: (within /usr/lib/libtcl8.4.so.0) 0x3AA802B2: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) Called from: 2 insignificant places == 4 =========================== Context accounted for 37.6% of measured spacetime 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) 0x3AA80286: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) 0x3A9EAFAE: ns_malloc (memory.c:67) Called from: 34.6% : 0x3A9EB004: ns_calloc (memory.c:85) 1.6% : 0x3A9EB5BD: Ns_CsInit (cslock.c:86) 1.2% : 0x3A9A9186: SockRead (driver.c:1403) --------------------------------- Context accounted for 13.3% of measured spacetime 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) 0x3AA80286: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) 0x3AA7EB70: Tcl_SetObjLength (in /usr/lib/libtcl8.4.so.0) Called from: 13.3% : 0x3AA5BA9C: (within /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 10.6% of measured spacetime 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) 0x3AA80286: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) 0x3AA597A7: (within /usr/lib/libtcl8.4.so.0) Called from: 10.6% : 0x3AA5C3AF: (within /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 7.8% of measured spacetime 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) 0x3AA80286: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) 0x3AA84B35: Tcl_DStringSetLength (in /usr/lib/libtcl8.4.so.0) Called from: 7.8% : 0x3A9A92D0: SockRead (driver.c:1443) --------------------------------- Context accounted for 7.0% of measured spacetime 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) 0x3AA80286: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) 0x3AA69AD1: (within /usr/lib/libtcl8.4.so.0) Called from: 7.0% : 0x3AA70C26: Tcl_GetStringFromObj (in /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 4.3% of measured spacetime 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) 0x3AA80286: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) 0x3AA7E60A: Tcl_NewStringObj (in /usr/lib/libtcl8.4.so.0) Called from: 2.7% : 0x3AA2A87F: (within /usr/lib/libtcl8.4.so.0) 1.5% : 0x3AA21DC2: Tcl_EvalTokensStandard (in /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 1.5% of measured spacetime 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) 0x3AA80286: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) 0x3AA43ED6: (within /usr/lib/libtcl8.4.so.0) Called from: 1.5% : 0x3AA43C2A: (within /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 1.4% of measured spacetime 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) 0x3AA80286: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) 0x3AA5930B: Tcl_CreateChannel (in /usr/lib/libtcl8.4.so.0) Called from: 1.4% : 0x3AA8C0F6: Tcl_MakeFileChannel (in /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 1.4% of measured spacetime 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) 0x3AA80286: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) 0x3AA69E86: TclRegisterLiteral (in /usr/lib/libtcl8.4.so.0) Called from: 1.4% : 0x3AA3E2E4: TclCompileScript (in /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 1.4% of measured spacetime 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) 0x3AA80286: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) 0x3AA6982B: (within /usr/lib/libtcl8.4.so.0) Called from: 1.4% : 0x3AA68B53: Tcl_ListObjGetElements (in /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 1.2% of measured spacetime 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) 0x3AA80286: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) 0x3AA84995: Tcl_DStringAppend (in /usr/lib/libtcl8.4.so.0) Called from: 1.2% : 0x3A9AA2C0: Ns_DStringVarAppend (dstring.c:67) --------------------------------- Context accounted for 32.1% of measured spacetime 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) 0x3AA80286: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA80427: TclpRealloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25F4B: Tcl_Realloc (in /usr/lib/libtcl8.4.so.0) Called from: 17.1% : 0x3AA8495B: Tcl_DStringAppend (in /usr/lib/libtcl8.4.so.0) 13.3% : 0x3AA7EC62: Tcl_SetObjLength (in /usr/lib/libtcl8.4.so.0) 1.6% : 0x3AA84A42: Tcl_DStringAppendElement (in /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 10.3% of measured spacetime 0x3AA80C50: (within /usr/lib/libtcl8.4.so.0) 0x3AA80286: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA80427: TclpRealloc (in /usr/lib/libtcl8.4.so.0) 0x3AA26025: Tcl_AttemptRealloc (in /usr/lib/libtcl8.4.so.0) Called from: 10.3% : 0x3AA7EDF8: Tcl_AttemptSetObjLength (in /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 6.9% of measured spacetime 0x3AA8029C: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) 0x3A9EAFAE: ns_malloc (memory.c:67) 0x3A9EB088: ns_strdup (memory.c:102) Called from: 6.9% : 0x3A9C341A: NsTclICtlObjCmd (tclinit.c:953) --------------------------------- Context accounted for 4.2% of measured spacetime 0x3AA8029C: TclpAlloc (in /usr/lib/libtcl8.4.so.0) 0x3AA25E04: Tcl_Alloc (in /usr/lib/libtcl8.4.so.0) 0x3A9EAFAE: ns_malloc (memory.c:67) 0x3A9EB004: ns_calloc (memory.c:85) Called from: 4.2% : 0x3A9BB325: CreatePool (server.c:584) --------------------------------- Context accounted for 1.1% of measured spacetime 0x3AA805A0: TclThreadAllocObj (in /usr/lib/libtcl8.4.so.0) 0x3AA709A8: Tcl_NewObj (in /usr/lib/libtcl8.4.so.0) 0x3AA91E1F: TclpInitLibraryPath (in /usr/lib/libtcl8.4.so.0) 0x3AA458CB: (within /usr/lib/libtcl8.4.so.0) Called from: 1.1% : 0x3AA43982: Tcl_FindExecutable (in /usr/lib/libtcl8.4.so.0) --------------------------------- Context accounted for 0.5% of measured spacetime 0x3AA804BD: TclpRealloc (in /usr/lib/libtcl8.4.so.0) 0x3AA26025: Tcl_AttemptRealloc (in /usr/lib/libtcl8.4.so.0) 0x3AA7EDF8: Tcl_AttemptSetObjLength (in /usr/lib/libtcl8.4.so.0) 0x3AA7F4E2: (within /usr/lib/libtcl8.4.so.0) Called from: 0.5% : 0x3AA7F187: Tcl_AppendObjToObj (in /usr/lib/libtcl8.4.so.0) ================================= End of information. Rerun with a bigger --depth value for more. -- 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.
massif.1252.pdf
Description: Adobe PDF document
