Am 02.02.2006 um 15:52 schrieb Vlad Seryakov:
I modified memtest to exclude thread related timings.
It is at the http://www.crystalballinc.com/vlad/tmp/memtest.c
when i call it with memtest 100000 and +, mallocs gettting faster
than Tcl alloc on my single CPU box
After poking and poking and poking arround, I came to a conclusion
that everything is right and everything is wrong.
Nice conclusion, hm? You can really build upon it :-/
I have modified the nsthread/nsthreadtest.c to make the memory
test with random blocksizes (up to 16K) instead of the fixed
10 bytes (which was indeed not very representative).
Still, I observe different results using different hardware and OS.
Generally, for Linux, we get mostly ns_malloc faster, although
I have bunch of 1cpu boxes here where this is NOT true.
OTOH, on Solaris/Mac 1cpu boxes, the malloc is faster or close
to the ns_malloc. On 2+ CPU boxes the ns_malloc is always faster.
It is difficult to say more about that w/o gathering extensive
statistics data from various people, which I find very time consuming.
Hence, it is good to know that one has to pay attention when running
the Tcl MT-app (or naviserver) on a single cpu box and that box is
a Solaris or Mac.
Anyways it has been quite revealing for me to learn all of this
thanks to your support and patience!
For us: bottom line is: we will stay with ns_malloc as-is as the
speed penalty vs. malloc on Solaris/Mac 1cpu is not worth the
effort.
Thanks again for your support!
Zoran