内存使用率查看
free
linux会最低限度的使用内存,buff和cache占用没有使用的内存。available包含cashe的容量。
swap:交互分区,当内存真的不够用的时候(available接近于0),linux回把暂时不使用的内存放入swap中(swap:used),swap占用的空间是磁盘空间,在windows中叫虚拟内存。如果swap经常被使用,说明内存真的不足了。
如果swap空间设置为0,当内存不足时,linux会随机杀掉占用内存比较大的教程用来释放内存--》产生不可预知性。