Skip to content

CG-spring/vps-benchmark-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

VPS 性能测试工具合集 | 一键跑分脚本大全

License GitHub stars

VPS 性能测试工具合集 - 收录最全面的服务器跑分脚本:Bench.sh、YABS、SuperBench、UnixBench、Speedtest 等

一键测试 CPU、内存、磁盘 I/O、网络带宽、回程路由

中文 | English


目录


为什么需要测试 VPS 性能?

测试项目对照表

测试项 说明 重要程度
CPU 跑分 处理器性能 ⭐⭐⭐⭐⭐
内存性能 读写速度 ⭐⭐⭐⭐
磁盘 I/O 硬盘读写 ⭐⭐⭐⭐⭐
网络带宽 上传/下载速度 ⭐⭐⭐⭐⭐
回程路由 到国内的线路质量 ⭐⭐⭐⭐⭐
延迟测试 到各地的延迟 ⭐⭐⭐⭐

性能参考标准

配置 UnixBench 跑分 适用场景
1核1G 300-500 轻量应用、代理
2核2G 800-1200 中型网站
4核4G 1500-2500 高并发应用
8核8G 3000-5000 大型服务

一键测试脚本大全

快速选择指南

脚本 特点 推荐度
YABS 最全面,包含磁盘+网络+CPU ⭐⭐⭐⭐⭐
Bench.sh 经典稳定,综合测试 ⭐⭐⭐⭐⭐
SuperBench 中文友好,国内优化 ⭐⭐⭐⭐⭐
UnixBench 专业 CPU 跑分 ⭐⭐⭐⭐
LemonBench 快速综合测试 ⭐⭐⭐⭐

Bench.sh - 经典综合测试

一键运行

# 标准版
wget -qO- bench.sh | bash

# 或使用 curl
curl -Lso- bench.sh | bash

# GitHub 原版
wget -qO- https://raw.githubusercontent.com/teddysun/across/master/bench.sh | bash

测试内容

项目 说明
CPU 信息 型号、核心数、频率
内存信息 总量、使用率
磁盘 I/O 读写速度测试
网络速度 上传/下载带宽
系统信息 内核版本、发行版

输出示例

CPU Model          : Intel Xeon E5-2680 v4
CPU Cores          : 2
CPU Frequency      : 2399.998 MHz
Total Memory       : 2048 MB
Total Disk         : 20 GB
I/O Speed(1stRun)  : 156 MB/s
I/O Speed(2ndRun)  : 148 MB/s
I/O Speed(3rdRun)  : 152 MB/s
Upload Speed       : 950.00 Mbit/s
Download Speed     : 980.00 Mbit/s

YABS - Yet Another Bench Script

一键运行

curl -sL yabs.sh | bash
#
wget -qO- yabs.sh | bash

特点

  • 最全面:CPU + 内存 + 磁盘 + 网络
  • Geekbench 评分:专业 CPU 跑分
  • 磁盘性能:4K/64K 随机读写
  • 网络测试:多节点测速

测试结果解读

指标 优秀 良好 一般
磁盘 I/O >500MB/s 200-500MB/s <200MB/s
Geekbench 单核 >1000 600-1000 <600
Geekbench 多核 >4000 2000-4000 <2000

SuperBench.sh - 增强版测试

一键运行

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

特点

  • ✅ 中文友好
  • ✅ 国内三网测速
  • ✅ 回程路由显示
  • ✅ 线路类型判断

测试内容

VPS 信息
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CPU 型号  : AMD EPYC 7601
CPU 核心数: 2
CPU 频率  : 2199.998 MHz
内存      : 2 GB
硬盘      : 20 GB
系统      : Debian 12

磁盘 I/O 测试
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
I/O Speed(1stRun) : 256 MB/s
I/O Speed(2ndRun) : 248 MB/s
I/O Speed(3rdRun) : 252 MB/s

网络测速
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Node Name        Upload Speed   Download Speed
电信 上海        950 Mbit/s     980 Mbit/s
联通 广州        920 Mbit/s     950 Mbit/s
移动 北京        880 Mbit/s     920 Mbit/s

UnixBench - CPU 跑分

一键运行

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

跑分参考

配置 单核分数 多核分数 评价
1核 1G 400-600 400-600 入门级
2核 2G 800-1000 1500-2000 主流
4核 4G 1000-1500 3500-5000 高性能
8核 8G 1500-2000 8000-12000 服务器级

网络测速工具

Speedtest CLI

# 安装
pip install speedtest-cli
#
apt install speedtest-cli

# 运行
speedtest-cli

# 指定服务器
speedtest-cli --server 12345

iperf3 测试

# 服务端
iperf3 -s

# 客户端
iperf3 -c server_ip -t 60 -i 10

# 双向测试
iperf3 -c server_ip -d

多节点测速脚本

# 三网测速
bash <(curl -Lso- https://git.io/superspeed)

# 国际节点测速
bash <(curl -Lso- https://git.io/speedtest)

回程路由测试

BestTrace

# 下载
wget https://cdn.ipip.net/17mon/besttrace4linux.zip
unzip besttrace4linux.zip
chmod +x besttrace

# 测试到北京电信
./besttrace 202.96.199.133

# 测试到上海联通
./besttrace 210.22.97.1

# 测试到广州移动
./besttrace 221.179.155.161

回程路由脚本

# 一键测试回程
wget -qO- git.io/besttrace.sh | bash

#
curl -Lso- https://raw.githubusercontent.com/zhanghanyun/backtrace/main/install.sh | bash

线路类型判断

线路 特点 延迟参考
CN2 GIA 最高质量,全程 59.43 150-180ms
CN2 GT 中等质量,部分 202.97 180-220ms
163 普通 普通线路,202.97 200-300ms
联通 4837 联通优质线路 150-200ms
移动 CMI 移动国际线路 180-250ms

磁盘 I/O 测试

dd 命令测试

# 写入测试
dd if=/dev/zero of=test bs=1M count=1000 conv=fdatasync

# 读取测试
dd if=test of=/dev/null bs=1M count=1000

# 清理
rm -f test

fio 专业测试

# 安装
apt install fio

# 随机读写测试
fio --name=randrw --ioengine=libaio --iodepth=16 --rw=randrw --bs=4k --direct=1 --size=1G --numjobs=4 --runtime=60 --time_based --group_reporting

# 顺序读写测试
fio --name=seqwrite --ioengine=libaio --iodepth=16 --rw=write --bs=1M --direct=1 --size=1G --numjobs=1 --group_reporting

磁盘性能参考

磁盘类型 I/O 速度 IOPS 适用场景
HDD 100-150 MB/s 100-200 存储
SATA SSD 400-500 MB/s 5000-10000 通用
NVMe SSD 1000-3000 MB/s 50000+ 高性能

综合测试脚本

一键综合测试

# LemonBench - 快速综合测试
curl -fsSL https://github.com/LemonBench/LemonBench/raw/master/LemonBench.sh | bash -s fast

# ZBench - 中文综合测试
wget -qO- https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench.sh | bash

# Nench - 自动化测试
(curl -s wget https://raw.githubusercontent.com/n-st/nench/master/nench.sh | bash) 2>&1 | tee nench.log

测试结果保存

# 保存到文件
(curl -s wget yabs.sh | bash) 2>&1 | tee vps_test_$(date +%Y%m%d).log

# 上传到 pastebin
(curl -s wget yabs.sh | bash) 2>&1 | curl -F 'clbin=<-' https://clbin.com

常见问题

Q1: 跑分多少算好?

用途 UnixBench 参考 说明
代理/VPN 500+ 够用
个人博客 800+ 流畅
企业网站 1500+ 良好
高并发 3000+ 推荐

Q2: 磁盘 I/O 慢怎么办?

原因 解决方法
虚拟化类型 KVM > OpenVZ
磁盘类型 NVMe > SSD > HDD
I/O 限制 联系服务商升级

Q3: 网络速度不达标?

检查项 操作
端口限速 检查服务商配置
线路问题 测试回程路由
拥堵时段 避开晚高峰测试

推荐资源

名称 说明 链接
VPSVIP VPS 主机测评与推荐 官网
VPS911 国外 VPS 测评 官网
HostLoc 主机交流论坛 论坛

License

MIT License - 2026


VPSVIP 主机测评 | ClashVIP | ClashHub


更多 VPS & Clash 工具,请查看 Awesome VPS & Clash Tools 精选合集

About

VPS Benchmark Tools - Server performance testing scripts collection (bench.sh, yabs, speedtest, unixbench)

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages