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
The original list is
{ 16, 1024, 512, NULL},
{ 32, 512, 256, NULL},
{ 64, 256, 128, NULL},
{ 128, 128, 64, NULL},
{ 256, 64, 32, NULL},
{ 512, 32, 16, NULL},
{ 1024, 16, 8, NULL},
{ 2048, 8, 4, NULL},
{ 4096, 4, 2, NULL},
{ 8192, 2, 1, NULL},
{16284, 1, 1, NULL},
For my experiments I used
{ 16, 1024, 512, NULL}, { 24, 1024, 512, NULL},
{ 32, 512, 256, NULL}, { 40, 512, 256, NULL},
{ 48, 512, 256, NULL}, { 56, 512, 256, NULL},
{ 64, 256, 128, NULL}, { 80, 256, 128, NULL},
{ 96, 256, 128, NULL}, { 112, 256, 128, NULL},
{ 128, 128, 64, NULL}, { 144, 128, 64, NULL},
{ 160, 128, 64, NULL}, { 176, 128, 64, NULL},
{ 192, 128, 64, NULL}, { 208, 128, 64, NULL},
{ 224, 128, 64, NULL}, { 240, 128, 64, NULL},
{ 256, 64, 32, NULL}, { 288, 64, 32, NULL},
{ 320, 64, 32, NULL}, { 352, 64, 32, NULL},
{ 384, 64, 32, NULL}, { 416, 64, 32, NULL},
{ 448, 64, 32, NULL}, { 480, 64, 32, NULL},
{ 512, 32, 16, NULL}, { 544, 32, 16, NULL},
{ 576, 32, 16, NULL}, { 608, 32, 16, NULL},
{ 640, 32, 16, NULL}, { 672, 32, 16, NULL},
{ 704, 32, 16, NULL}, { 736, 32, 16, NULL},
{ 768, 32, 16, NULL}, { 800, 32, 16, NULL},
{ 832, 32, 16, NULL}, { 864, 32, 16, NULL},
{ 896, 32, 16, NULL}, { 928, 32, 16, NULL},
{ 960, 32, 16, NULL}, { 992, 32, 16, NULL},
etc... for I think 108 buckets. My general strategy was to make the
size difference between consecutive buckets no more than about 10% while
keeping the differences as powers of 2. I don't understand the
implications of the maxblocks and nmove numbers as well, so I just
guessed at those.
Another thing you could try is to change your tcl config to not use
tcl's thread allocator at all (by undefing USE_THREAD_ALLOC) and using
google's tcmalloc instead, which seems to take a similar approach with
lots of closely spaced buckets.
-J
--
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.