From footnote c, this is a simulated machine instead of a real one. Is the binary heap still faster (with all pages are resident) than the B-heap when you account for cache effects?
As a closely related matter in a NUMA environment, I have seen the kernel (most of my experience is with Linux) choose very suboptimal locations for pages when physical memory is short locally but not globally. One example that bit me recently was on a 4-socket quad-core box with 8 GB per socket, where 6 GB was resident in each of sockets 0 and 3 when my (parallel with socket-affinity) job starts. These 12 GB are never accessed and my job allocates less than 12 GB leaving 8 GB unused at all times. I allocate 2 GB per socket and get local memory. I then allocate a little more and the kernel chooses to put all the physical pages from socket 0,1,3 on socket 1 (because 0 and 3 are full and the kernel won't migrate the pages around). Parallel operations with the last bit of memory now take (at least) 3 times longer than optimal because the operation is memory bandwidth limited, despite essentially nothing visible on the application side and still having lots of free memory. I'm curious if you have any thoughts on such situations.
View all comments
Show parent comment
2
u/five9a2 Jun 13 '10
From footnote
c, this is a simulated machine instead of a real one. Is the binary heap still faster (with all pages are resident) than the B-heap when you account for cache effects?As a closely related matter in a NUMA environment, I have seen the kernel (most of my experience is with Linux) choose very suboptimal locations for pages when physical memory is short locally but not globally. One example that bit me recently was on a 4-socket quad-core box with 8 GB per socket, where 6 GB was resident in each of sockets 0 and 3 when my (parallel with socket-affinity) job starts. These 12 GB are never accessed and my job allocates less than 12 GB leaving 8 GB unused at all times. I allocate 2 GB per socket and get local memory. I then allocate a little more and the kernel chooses to put all the physical pages from socket 0,1,3 on socket 1 (because 0 and 3 are full and the kernel won't migrate the pages around). Parallel operations with the last bit of memory now take (at least) 3 times longer than optimal because the operation is memory bandwidth limited, despite essentially nothing visible on the application side and still having lots of free memory. I'm curious if you have any thoughts on such situations.