Loading... 这年头VPS主机太多了,好多“二手”VPS开始横行其道,让人真假莫辨,想要购买某一个VPS主机,一般是先要看看这家的VPS主机的评测数据。 需要提醒的是,关于IO读写速度的测试,根据以往的经验,像谷歌云服务器、亚马逊服务器等,IO读写速度都比较低,而SSD在IO方面表现出色。另外,国外的VPS主机的速度很大程度上取决于线路的好坏,并且晚上和白天的测试速度会差别比较大。 **高性价比和便宜的VPS/云服务器推荐:**[https://blog.zeruns.tech/archives/383.html](https://blog.zeruns.tech/archives/383.html) - **[UCloud十周年庆典](https://www.ucloud.cn/site/active/kuaijie.html?invitation_code=C1x5E3EE29AA7B9):** 1核2G,**128元/3年(约3.6元/月)**;2核4G,**323元/3年(约8.9元/月)**;4核8G,**1269元/3年(约35元/月)**;8核16G,**4459元/3年(约123.8元/月)**。 - **[天翼云](https://blog.zeruns.tech/archives/659.html):** 4核8G,287元/年(约23元/月) ;**8核16G,611元/年(约50元/月)**。 - **[华为云特惠专区](https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=da3c489a-decc-49d0-9226-f09b495965b7&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905):** 2核2G 4M,**45元/年(约3.7元/月)**;2核4G 5M,**269元/年(约22.4元/月)**。 - **[腾讯云每日秒杀](https://cloud.tencent.com/act/cps/redirect?redirect=1062&cps_key=69aab81d20a9e10e5ad56107d5303535&spread_hash_key=382044a678827f5a526f5a6ee9b2925e&from=console)**,4核8G10M,**306元/年(约25.5元/月)**。 - **[阿里云小站](https://www.aliyun.com/minisite/goods?taskPkg=2022cgj&pkgSid=278471&userCode=jdjc69nf)**,2C2G,**68元/年**(约5.6元/月);2C4G1\~10M,622元/3年(约17元/月)。 **各大厂商云服务器性能评测对比,阿里云、腾讯云、华为云、Ucloud、天翼云:[https://blog.zeruns.tech/archives/670.html](https://blog.zeruns.tech/archives/670.html)** 雨云 13900K 宿迁高防云服务器性能测评,2核4G 5兆 150G防御 仅需75元/月:[https://blog.zeruns.tech/archives/701.html](https://blog.zeruns.tech/archives/701.html) **下面我汇总了几个比较好用的测试脚本。** ## lemonbench lemonbench提供比superbench更详细的测试,除了磁盘io和网速测试外,它还提供vps的cpu跑分,内存读写速度,回程路由追踪,流媒体解锁情况等测试,测试完之后还能生成分享链接 [例子](https://paste.ubuntu.com/p/hC3vF5wgjQ/),可以直接在浏览器上查看或是分享给他人。该脚本有两种模式。 使用`curl -fsL https://ilemonra.in/LemonBenchIntl | bash -s fast`进行快速测试,该模式下测试速度较快,但是结果没那么详细,部分测试的次数较少(如磁盘io测试),测速节点较少,路由追踪也不会测那么多个节点。使用`curl -fsL https://ilemonra.in/LemonBenchIntl | bash -s full`进行测试时,会进行更加详细全面的测试,测试次数会更多,使用的节点也更多,当然耗时会更长。 ```bash curl -fsL ilemonra.in/LemonBench | bash -s -- --fast curl -fsL ilemonra.in/LemonBench | bash -s -- --full # 备用:curl -fsL img.zeruns.tech/down/sh/LemonBench.sh | bash -s -- --full ```  ## yabs.sh 完整测试 ```bash curl -sL yabs.sh | bash # 备用地址 curl -sL https://jsdelivr.zeruns.tech/gh/masonr/yet-another-bench-script@master/yabs.sh | bash ``` 参数测试 ```bash ## 添加需要的参数 curl -sL yabs.sh | bash -s -- -{fdighr49} ## 例:(仅进行Geekbench 5测试) curl -sL yabs.sh | bash -s -- -fdi ``` 可选参数列表 * `-f` 此选项禁用fio测试 * `-d` 此选项禁用磁盘性能测试 * `-i` 此选项禁用网络性能测试 * `-g` 此选项将禁用Geekbench系统性能测试 * `-h` 此选项打印包含用法、检测到的标志和本地包(fio/iperf)状态的帮助消息 * `-r` 此选项可减少iperf位置的数量(Online.net/Clouvider LON+NYC)以减少带宽使用 * `-4` 此选项覆盖geekbench5性能测试,而运行geekbench4测试 * `-9` 这个选项除了运行Geekbench 5测试之外,还运行Geekbench 4测试  ## Geekbench 5 Geekbench 5 官方测试脚本 ```bash wget --no-check-certificate https://img.zeruns.tech/down/Geekbench-5.4.3-Linux.tar.gz && tar xf Geekbench-5.4.3-Linux.tar.gz && cd Geekbench-5.4.3-Linux ./geekbench_x86_64 ```  ## Geekbench 6 Geekbench这几年成为手机以及PC跑分的一大基准测试,可以方便对比安卓与iPhone处理器的性能差距,Geekbench 5版还是2019年发布的,刚刚Primal Labs发布了最新的Geekbench 6,跑分规则大改。 Geekbench 6增加了对最新硬件的支持,追求的是更有真实意义的性能测试,这次的一大重点改进就是大幅弱化CPU单核跑分的重要性,开发商表示时代不一样了,主核心不再那么重要,而且机器学习正在兴起,多核性能变得更加重要。 Geekbench 6 官方测试脚本 ```bash wget --no-check-certificate https://img.zeruns.tech/down/Geekbench-6.0.1-Linux.tar.gz && tar xf Geekbench-6.0.1-Linux.tar.gz && cd Geekbench-6.0.1-Linux ./geekbench_x86_64 ``` ARM版: ```shell wget https://cdn.geekbench.com/Geekbench-6.1.0-LinuxARMPreview.tar.gz && tar xf Geekbench-6.1.0-LinuxARMPreview.tar.gz && cd Geekbench-6.1.0-LinuxARMPreview ./geekbench_aarch64 ```  ## 流媒体解锁 **全流媒体解锁测试** ```bahs bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh) ```  ## 综合工具箱 ``` wget -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh && chmod +x box.sh && clear && ./box.sh ```  ## Superspeed.sh **一键测试服务器到国内的速度脚本Superspeed.sh :** ```shell bash <(curl -Lso- https://raw.githubusercontent.com/BlueSkyXN/SpeedTestCN/main/superspeed.sh) ```  ## SuperBench.sh **一键检测VPS的CPU、内存、负载、IO读写、机房带宽和服务器类型等脚本SuperBench.sh:** ```shell wget -N --no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh sudo bash superbench.sh #或者 curl -Lso- https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash ```  ## Zench **Zench可以看作是Bench.sh 和 SuperBench的结合版本,加入 Ping 以及 路由测试 功能,会生成测评报告,可以很方便地分享给其他朋友看自己的测评数据 :** ```sh wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench-CN.sh sudo bash ZBench-CN.sh #项目:https://github.com/FunctionClub/ZBench ```  ## speedtest-cli **一键带宽检测工具:speedtest-cli** **安装命令:** ```shell sudo apt-get update apt-get install python-pip sudo pip install speedtest-cli #CentOS yum update yum -y install epel-release yum install python-pip pip install speedtest-cli ``` **使用方法:** ```shell speedtest-cli #后面也可以接以下参数: -h, --help show this help message and exit --share 分享你的网速,该命令会在speedtest网站上生成网速测试结果的图片。 --simple Suppress verbose output, only show basic information --list 根据距离显示speedtest.net的测试服务器列表。 --server=SERVER 指定列表中id的服务器来做测试。 --mini=MINI URL of the Speedtest Mini server --source=SOURCE Source ip address to bind to --version Show the version number and exit ``` ## unixbench **VPS性能综合跑分工具unixbench:** Unixbench的主要测试项目有:系统调用、读写、进程、图形化测试、2D、3D、管道、运算、C库等系统基准性能提供测试数据。最新版本`UnixBench5.1.3`,包含`system和graphic`测试,如果你需要测试graphic,则需要修改Makefile。 不要注释掉` GRAPHIC_TESTS = defined` ,同时需要系统提供` x11perf` 命令gl_glibs库。本文脚本注释了关于`graphic`的测试项(大多数VPS都是没有显卡或者是集显,所以图像性能无需测试),运行10-30分钟后(根据CPU内核数量,运算时间不等)得出分数,越高越好。 **UnixBench性能跑分受版本影响较大。** UnixBench目前有不同的版本,而网上不少的版本也是经过人工修改过的,可能测试的项目不同导致的结果也会不同。大家在测试时记得找一个参照对比。 ```shell yum -y install wget screen #for CentOS/Redhat # apt-get -y install wget screen #for Debian/Ubuntu screen -S zeruns #如果网路出现中断,可以执行命令`screen -R zeruns`重新连接测试窗口 wget --no-check-certificate https://jsdelivr.zeruns.tech/gh/teddysun/across@master/unixbench.sh && chmod +x unixbench.sh && ./unixbench.sh ``` ARM版: ```shell # 下载源码 git clone https://github.com/kdlucas/byte-unixbench.git # 安装依赖 sudo apt install -y make gcc # 进入目录 cd byte-unixbench/UnixBench # 编译 make # 编译完成后,需要给 执行程序赋予执行权限 sudo chmod u+x ./Run # Ps:除了 Run 程序测试多核的时候,需要执行其他脚本 # 为了避免报错,最好把 UnixBench 目录下脚本都赋予执行权限 sudo chmod u+x -R ./* # 开始测试 sudo ./Run ``` 各测试项目详细说明: ```shell # Dhrystone 2 using register variables 此项用于测试 string handling,因为没有浮点操作,所以深受软件和硬件设计(hardware and software design)、编译和链接(compiler and linker options)、代码优化(code optimazaton)、对内存的cache(cache memory)、等待状态(wait states)、整数数据类型(integer data types)的影响。 # Double-Precision Whetstone 这一项测试浮点数操作的速度和效率。这一测试包括几个模块,每个模块都包括一组用于科学计算的操作。覆盖面很广的一系列 c 函数:sin,cos,sqrt,exp,log 被用于整数和浮点数的数学运算、数组访问、条件分支(conditional branch)和程序调用。此测试同时测试了整数和浮点数算术运算。 # Execl Throughput 此测试考察每秒钟可以执行的 execl 系统调用的次数。 execl 系统调用是 exec 函数族的一员。它和其他一些与之相似的命令一样是 execve() 函数的前端。 # File copy 测试从一个文件向另外一个文件传输数据的速率。每次测试使用不同大小的缓冲区。这一针对文件 read、write、copy 操作的测试统计规定时间(默认是 10s)内的文件 read、write、copy 操作次数。 # Pipe Throughput 管道(pipe)是进程间交流的最简单方式,这里的 Pipe throughtput 指的是一秒钟内一个进程可以向一个管道写 512 字节数据然后再读回的次数。需要注意的是,pipe throughtput 在实际编程中没有对应的真实存在。 # Pipe-based Context Switching 这个测试两个进程(每秒钟)通过一个管道交换一个不断增长的整数的次数。这一点很向现实编程中的一些应用,这个测试程序首先创建一个子进程,再和这个子进程进行双向的管道传输。 # Process Creation 测试每秒钟一个进程可以创建子进程然后收回子进程的次数(子进程一定立即退出)。process creation 的关注点是新进程进程控制块(process control block)的创建和内存分配,即一针见血地关注内存带宽。一般说来,这个测试被用于对操作系统进程创建这一系统调用的不同实现的比较。 # System Call Overhead 测试进入和离开操作系统内核的代价,即一次系统调用的代价。它利用一个反复地调用 getpid 函数的小程序达到此目的。 # Shell Scripts 测试一秒钟内一个进程可以并发地开始一个 shell 脚本的 n 个拷贝的次数,n 一般取值 1,2,4,8。(我在测试时取 1, 8)。这个脚本对一个数据文件进行一系列的变形操作(transformation)。 ```  ## Serverreview **Serverreview-benchmark综合评测工具** 这是一个老外写的VPS主机综合评测工具,主要评测的项目有VPS主机磁盘IO、内存读写、CPU性能以及Benchmark性能,还有美国、欧洲、亚洲等不同节点的下载速度。主页:https://github.com/sayem314/serverreview-benchmark **脚本使用使用方法:** ``` yum install curl -y curl -LsO https://raw.githubusercontent.com/sayem314/serverreview-benchmark/master/bench.sh; chmod +x bench.sh && ./bench.sh -a share ```  ## mPing **一键测试回程Ping值工具:mPing** ``` wget https://raw.githubusercontent.com/helloxz/mping/master/mping.sh bash mping.sh ``` 参数说明: ``` x% packet loss: 丢包率 min: 最低延迟 avg: 平均延迟 max: 最高延迟 mdev: 平均偏差 ```  ## phoronix-test-suite phoronix-test-suite是目前Linux下比较常用的性能测试软件。 使用phoronix-test-suite条件前提:需要安装php5,需要PHP都DOM扩展 ```bash wget http://www.phoronix.net/downloads/phoronix-test-suite/releases/phoronix-test-suite-7.4.0.tar.gz && tar -xzvf phoronix-test-suite-7.4.0.tar.gz && cd phoronix-test-suite/ && ./install-sh yum install php-cli php-xml phoronix-test-suite benchmark smallpt ``` 自己的结果图 单位:Seconds (数值越小越好)  ## 推荐阅读 - 搭建内网穿透服务器,带Web面板:[https://blog.zeruns.tech/archives/660.html](https://blog.zeruns.tech/archives/660.html) - 使用Cloudreve自建网盘:https://blog.zeruns.tech/archives/515.html - 怎样搭建个人博客:https://blog.zeruns.tech/archives/218.html - 学生优惠权益大全:[https://blog.zeruns.tech/archives/557.html](https://blog.zeruns.tech/archives/557.html) - 使用iperf3测试局域网或wifi实际最大带宽:[https://blog.zeruns.tech/archives/514.html](https://blog.zeruns.tech/archives/514.html) - 我的世界服务器搭建(开服)教程:[https://blog.zeruns.tech/tag/mc/](https://blog.zeruns.tech/tag/mc/) 最后修改:2023 年 08 月 29 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 1 如果您觉得我的文章有帮助,请随意赞赏,赞赏有助于激发博主的热情,感谢!
8 条评论
刚准备写一波,既然阁下写了,我就转载一下啦(等授权)
没问题,留个原文链接就行
图片我也偷了哈,我的VPS有的时候跑不了全部的命令
感谢
羡慕大佬天天都有新的VPS玩。
没有没有,文章中测试用的是用代金券买的腾讯云服务器和自己的电脑
有什么好的香港主机推荐。
这个的香港虚拟主机速度不错,价格也便宜:https://blog.zeruns.tech/archives/532.html