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.