好吧,因为没人愿意回答... :)
在Synaptic上搜索“基准”可找到许多能够测试机器不同方面的基准测试套件。我以前听说的唯一一个是phoronix-test-suite
,尽管我的注意力不集中,但我无法确定如何使用它,但我相信它非常全面。
然后我找到了UnixBench,它被描述为
UnixBench是原始的BYTE UNIX基准测试套件,多年来被许多人更新和修订。
UnixBench的目的是提供类Unix系统性能的基本指标。...然后将这些测试结果与基线系统的分数进行比较,以产生一个索引值,该指数值通常比原始分数更易于处理。
处理多CPU系统。...测试通过将Unix系统的结果与一组分数相比较来比较Unix系统,这些分数是通过在基准系统(SPARCstation 20-61,额定值为10.0)上运行代码而设置的。
Linode在这篇博客文章中提到UnixBench作为VM性能测试的工具:
与Xen相比,使用相同的硬件,KVM Linodes更快。例如,在我们的UnixBench测试中,KVM Linode的得分比Xen Linode高出3倍。
该测试套件不在Ubuntu存储库中,但是下载并编译它并不容易:
wget https://github.com/kdlucas/byte-unixbench/archive/master.zip
unzip ./master.zip
cd ./byte-unixbench-master/UnixBench
./Run
测试需要一段时间才能完成。输出看起来像
------------------------------------------------------------------------
Benchmark Run: Mon Oct 15 2012 23:55:22 - 00:23:16
4 CPUs in system; running 1 parallel copy of tests
Dhrystone 2 using register variables 12015218.4 lps (10.0 s, 7 samples)
Double-Precision Whetstone 2214.8 MWIPS (10.1 s, 7 samples)
Execl Throughput 896.9 lps (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 58968.3 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 14578.6 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 422068.2 KBps (30.0 s, 2 samples)
Pipe Throughput 70993.3 lps (10.0 s, 7 samples)
Pipe-based Context Switching 16001.5 lps (10.0 s, 7 samples)
Process Creation 1861.8 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 2525.5 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 737.8 lpm (60.1 s, 2 samples)
System Call Overhead 432496.2 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 12015218.4 1029.6
Double-Precision Whetstone 55.0 2214.8 402.7
Execl Throughput 43.0 896.9 208.6
File Copy 1024 bufsize 2000 maxblocks 3960.0 58968.3 148.9
File Copy 256 bufsize 500 maxblocks 1655.0 14578.6 88.1
File Copy 4096 bufsize 8000 maxblocks 5800.0 422068.2 727.7
Pipe Throughput 12440.0 70993.3 57.1
Pipe-based Context Switching 4000.0 16001.5 40.0
Process Creation 126.0 1861.8 147.8
Shell Scripts (1 concurrent) 42.4 2525.5 595.6
Shell Scripts (8 concurrent) 6.0 737.8 1229.7
System Call Overhead 15000.0 432496.2 288.3
========
System Benchmarks Index Score 249.7
------------------------------------------------------------------------
Benchmark Run: Tue Oct 16 2012 00:23:16 - 00:51:20
4 CPUs in system; running 4 parallel copies of tests
Dhrystone 2 using register variables 42619039.2 lps (10.0 s, 7 samples)
Double-Precision Whetstone 8274.0 MWIPS (10.4 s, 7 samples)
Execl Throughput 3398.5 lps (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 68332.4 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 21462.9 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 718205.6 KBps (30.0 s, 2 samples)
Pipe Throughput 149713.5 lps (10.0 s, 7 samples)
Pipe-based Context Switching 61968.3 lps (10.0 s, 7 samples)
Process Creation 5321.7 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 5957.1 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 812.6 lpm (60.1 s, 2 samples)
System Call Overhead 1557391.5 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 42619039.2 3652.0
Double-Precision Whetstone 55.0 8274.0 1504.4
Execl Throughput 43.0 3398.5 790.4
File Copy 1024 bufsize 2000 maxblocks 3960.0 68332.4 172.6
File Copy 256 bufsize 500 maxblocks 1655.0 21462.9 129.7
File Copy 4096 bufsize 8000 maxblocks 5800.0 718205.6 1238.3
Pipe Throughput 12440.0 149713.5 120.3
Pipe-based Context Switching 4000.0 61968.3 154.9
Process Creation 126.0 5321.7 422.4
Shell Scripts (1 concurrent) 42.4 5957.1 1405.0
Shell Scripts (8 concurrent) 6.0 812.6 1354.3
System Call Overhead 15000.0 1557391.5 1038.3
========
System Benchmarks Index Score 592.5
这意味着所讨论的VPS 对于单个任务的得分为249.7,对于并行处理的得分为592.5。
我的台式机虽然与运行VPS的物理机具有相似或更低的规格,但单任务得分为1409.7,并行处理得分为5156.3。正是我想要的那种指标。
另一个重要指标是网络速度。我找到了一个脚本,可以从不同位置下载测试文件并测量下载速度。该脚本可以与
wget freevps.us/downloads/bench.sh -O - -o /dev/null|bash
(尽管在运行之前下载脚本并检查其内容可能更安全)
要监视磁盘I / O延迟ioping
,可以从Ubuntu存储库安装实用程序:
# ioping . -c 10
4096 bytes from . (ext4 /dev/disk/...): request=1 time=16.4 ms
4096 bytes from . (ext4 /dev/disk/...): request=2 time=16.1 ms
...