加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

ubuntu buff/cache占用空间过大解决方法

发布时间:2020-12-13 17:53:53 所属栏目:Linux 来源:网络整理
导读:背景:服务器上传codis的备份文件到服务器之后,发现codis无法工作,经过查看log发现原来是内存不够导致的。 如图所示: #?free?-g???????????????total????????used????????free??????shared??buff/cache???availableMem:?????????????62??????????34??????

背景:服务器上传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


(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读