哈哈哈 (@dream2027)佬友们有个linux page cache的问题 中发帖

写c代码,发现一个问题的,大家一般是选择哪个方案 
没有模型的时候,没招了就选择了 echo 1 > /proc/sys/vm/drop_caches
/ # free -h
total used free shared buff/cache available
Mem: 7.8G 1.2G 1020.9M 708.0K 5.5G 6.3G
Swap: 1024.0M 0 1024.0M
/

现象:假设持续落文件,cache 不停上涨
场景:程序大量 write/fwrite 输出文件,page cache 不断吃掉内存,free 看 buff/cache 一路走高




方案
核心做法
写性...