Node size and cache-line ping pong on SMP
Node size and cache-line ping pong on SMP
Posted Mar 17, 2006 21:27 UTC (Fri) by jzbiciak (guest, #5246)Parent article: Trees I: Radix trees
I wonder what's magic about 64, other than that it's 6 bits? On a 32-bit architecture, that's 256 bytes of storage for the 64 pointers. On a machine like the Athlon, cache lines are 64 bytes, which means each node of the tree occupies 4 cache lines. In an SMP context, is there an advantage to sizing the nodes down to occupy a single cache line, or is there a sort of hashing benefit to having each node require multiple cache lines? e.g. Would I get more pingponging or less if the nodes were smaller? Does the answer change based on # of CPUs?
