0

I am currently working on a NUMA machine. I came across an issue that when I perform disk I/O, the page cached started to pile up in the current node (node 0). And when I further malloc new memories, they went to another node (node 1), leading poor performance.

I am thinking of two possible solutions, but do not know if they work.

(1) Use numa_alloc_onnode() on node 0. But I am not sure if this could overwrite the page cache in node 0 or still going to node 1.

(2) To drop cache node 0 whenever they start to pile up (cache in node 1 should not be dropped as they are useful). But I don't know how to do this.

user3743384
  • 91
  • 1
  • 11

1 Answers1

0

You should do your disk IO via mmap. First because if you are filling the RAM off a NUMA system, you are probably doing a lot of IO, and doing so will improve performance, and secondly this will enable you to take control on where the OS does the allocations, (or even move the pages afterwards) using the numa library.

Running your process with numactl and the interleave policy might also work, if you don't want to bother moving your threads to the right place before running mmap.