背景:服务器上传codis的备份文件到服务器之后,发现codis无法工作,经过查看log发现原来是内存不够导致的。
如图所示:
# free -g total used free shared buff/cache available Mem: 62 34 0 0 28 28 Swap: 0 0 0
解决方法:
echo 1 > /proc/sys/vm/drop_caches echo 2 > /proc/sys/vm/drop_caches echo 3 > /proc/sys/vm/drop_caches
清除缓存后空间为:
# free -g total used free shared buff/cache available Mem: 62 34 28 0 0 28 Swap: 0 0 0