首先感谢 @斯大林 的教程贴 教程,检查自己的kvm内存有没有被超售
脚本已在GitHub上开源:https://github.com/uselibrary/memoryCheck
用于检测VPS内存是否超售的一键脚本,检测范围包括:
- 内存交换(Swap)
- 气球驱动(Balloon)
- Kernel Samepage Merging(KSM内存合并)
一键脚本如下,若有超售,将以红色字体标注。
curl https://raw.githubusercontent.com/uselibrary/memoryCheck/main/memoryCheck.sh | bash
如果上述执行出错,可以尝试以下命令:
wget --no-check-certificate -O memoryCheck.sh https://raw.githubusercontent.com/uselibrary/memoryCheck/main/memoryCheck.sh && chmod x memoryCheck.sh && bash memoryCheck.sh
示例
狗云香港BGP没有超售内存

CloudCone通过virtio_balloon超售内存。PS:大多数商家都会这么干。


也要我买了才能测,买都买了也无所谓了
Balloon 这个我好多vps都有,dd完系统也有这个,我觉得商家不一定是启用了,我是把它关了。