服务器(vps)性能测试脚本汇总

行云流水
2022-04-07 / 2 评论 / 2,829 阅读 / 正在检测是否收录...

前言

我们选购vps的后,最好对vps做一下测试。记录一下网络上各种vps测试脚本的使用方法和结果展示。

性能测试

bench.sh

wget -qO- bench.sh | bash

superbench.sh

wget -qO- --no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash

yabs.sh

curl -sL yabs.sh | bash

unixbench.sh

wget --no-check-certificate https://github.com/teddysun/across/raw/master/unixbench.sh && sh unixbench.sh

sysbench

# 安装
curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.rpm.sh | bash
yum -y install sysbench

# 测试fileio,进入要测试的硬盘目录
sysbench fileio --file-num=1 --file-total-size=1G --file-test-mode=rndrw --time=300 prepare
sysbench fileio --file-num=1 --file-total-size=1G --file-test-mode=rndrw --time=300 run
sysbench fileio --file-num=1 --file-total-size=1G --file-test-mode=rndrw --time=300 cleanup

# 测试 cpu
sysbench cpu --cpu-max-prime=3 run

# 测试memory
sysbench memory --memory-total-size=2G run

# 测试threads
sysbench threads --thread-yields=2 --thread-locks=4 run

网络测试

Superspeed

wget https://raw.githubusercontent.com/ernisn/superspeed/master/superspeed.sh
chmod +x superspeed.sh && ./superspeed.sh

没有结果,需要修改脚本

# 77行
wget --no-check-certificate -qO speedtest.tgz  https://install.speedtest.net/app/cli/ookla-speedtest-1.1.1-linux-$(uname -m).tgz > /dev/null 2>&1

TCP回程路由测试

curl http://tutu.ovh/bash/returnroute/test.sh|bash

Besttrace4Linux路由测试脚本

#下载
wget http://cdn.ipip.net/17mon/besttrace4linux.zip
#解压
unzip besttrace4linux.zip
#授权
chmod +x besttrace
#使用
./besttrace -q 1  114.114.114.114

其他测试

超内存测试

#CentOS / RHEL
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 / Debian
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

综合测试

vpstest

wget git.io/vpstest && bash vpstest

GeekBench5

wget git.io/vpstest && bash vpstest  #选择9

ZBench

# 中文版
wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench-CN.sh && bash ZBench-CN.sh


# 英文版
wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench.sh && bash ZBench.sh

执行脚本有报错需要修改


编辑 ZBench.sh

#注释行
#speed_test 'http://speedtest.tokyo.linode.com/100MB-tokyo.bin' 'Linode, Tokyo, JP'
#speed_test 'http://speedtest.sea01.softlayer.com/downloads/test100.zip' 'Softlayer, Seattle, WA'
#wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZPing-CN.py > /dev/null 2>&1'
#wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/master/Generate.py >> /dev/null 2>&1
#api.zbench.kirito.moe 域名也已经失效

手动下载 ZPing-CN.py

cd /tmp/
wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZPing-CN.py > /dev/null 2>&1

## 打开脚本,注释内容,或更新为有效的节点IP
#'合肥': '112.122.10.26',
#'武汉': '113.57.249.2',
#'北京': 'st1.bjtelecom.net',
#'成都': 'speed.westidc.com.cn',

手动下载 Generate.py

import time
#traceroute_to_dict函数添加
#19行
time.sleep(1)

91yuntest

## 未进行ping测试和unixbench跑分
wget -N --no-check-certificate https://raw.githubusercontent.com/91yun/91yuntest/master/test.sh && bash test.sh -i "io,bandwidth,chinabw,download,backtraceroute"

## 完整测试版,耗时较长
wget -N --no-check-certificate https://raw.githubusercontent.com/91yun/91yuntest/master/test.sh && bash test.sh -i "io,bandwidth,chinabw,download,backtraceroute,gotoping,benchtest"

LemonBenchIntl

curl -fsL https://ilemonra.in/LemonBenchIntl | bash -s fast

评论 (2)

取消
只有登录/注册用户才可评论
  1. 头像
    smile
    · MacOS · Safari
    沙发

    这篇文章写的真不错,真详细,点个赞。

    回复
  2. 头像
    zx
    · Windows 10 · Google Chrome
    板凳

    看看

    回复