注意事项

这里测试的内存为 Ram+Swap的总和。Ram是指我们通常所指的内存,Swap指的是 突发内存 ,不可以长时间占用但是也是能用的。具体请百度。

测试程序

CentOS 系统:

yum install wget -y yum groupinstall “Development Tools” -y wget https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp gcc -l stdc++ memtester.cpp ./a.out

Ubuntu系统:

apt-get update apt-get install wget build-essential -y wget https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp gcc -l stdc++ memtester.cpp ./a.out

运行了之后只需要等待3秒钟就可以测试了。具体效果像下面这样: VPS.png

最后说两句

这个测试的内存是指你在当前时刻实际能用的最大内存(Ram + Swap 总和)。可能会随着同一台母鸡上的用户活动而变化。(看商家放了多少活动的用户在上面)。