如何释放linux cached 缓存

想要在测试机器上跑spark调试代码,但是发现几台free内存为0g。

我们知道实际可使用内存=free+buffers+cached

那么如何将cached内存清空,增加free呢。

先sync将缓存写入文件,然后su到root下执行 echo 3 > /proc/sys/vm/drop_caches

猜你喜欢

转载自www.cnblogs.com/bainily/p/9995315.html