
很多同学在购买新的VPS以后,常常问yqf.me应该如何进行测试,来确定自己购买的VPS性能。yqf.me结合互联网上的相关文章,正好今天手里拿了一个Hardbirch xen 512 linux vps,顺便来个测评,总结如下:
•VPS的linux版本查看命令:cat /etc/issue
•VPS的资源消耗查看命令:top
•VPS的内存使用情况查看命令:free -m
•VPS的CPU信息查看命令:cat /proc/cpuinfo
•使用DD对VPS硬盘I/O进行读写性能测试
•VPS出口、入口网络性能测试
•使用UB软件对LinuxVPS性能综合跑分测试
•国内、国外以及VPS网站访问速度测试
一、VPS的linux版本查看
[root@test ~]# cat /etc/issue
CentOS release 5.8 (Final)
Kernel \r on an \m
二、VPS的资源消耗命令查看
top – 04:22:07 up 1 min, 1 user, load average: 0.03, 0.01, 0.00
Tasks: 72 total, 1 running, 71 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 509592k total, 44816k used, 464776k free, 1872k buffers
Swap: 524280k total, 0k used, 524280k free, 22736k cached
以上可以查看服务器运行时间,负载情况,cpu占用情况,内存使用情况,等。
三、VPS的内存使用情况查看
[root@test ~]# free -m
total used free shared buffers cached
Mem: 497 43 453 0 1 22
-/+ buffers/cache: 19 477
Swap: 511 0 511
四、VPS的CPU信息查看命令:cat /proc/cpuinfo
[root@test ~]# cat /etc/cpuinfo
cat: /etc/cpuinfo: No such file or directory
[root@test ~]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 30
model name : Intel(R) Xeon(R) CPU X3450 @ 2.67GHz
stepping : 5
cpu MHz : 2666.666
cache size : 8192 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht nx unfair_spinlock pni ssse3 sse4_1 sse4_2 popcnt hypervisor
bogomips : 5333.33
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 30
model name : Intel(R) Xeon(R) CPU X3450 @ 2.67GHz
stepping : 5
cpu MHz : 2666.666
cache size : 8192 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht nx unfair_spinlock pni ssse3 sse4_1 sse4_2 popcnt hypervisor
bogomips : 5333.33
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
附:CPU查询:www.anandtech.com/Bench – www.cpubenchmark.net
你可以在这个网站上,查到你使用VPS的CPU怎么样,综合评分如何等。然后,你要观察一下,一共给你几核,每核的频率是多少。总体来讲,单核高频不限,比多核低频的性能要好一些。以下是linode的cpu和hardbirch的VPS使用的cpu比较:
五、硬盘IO性能测试
测试硬盘IO性能,对硬盘的损害很大,不建议多次或长时间尝试,命令如下:
dd if=/dev/zero of=test bs=64k count=4k oflag=dsync
测试结果,如果超过10M,对正常建站就无影响。超过50M,就是非常给力状态。
[root@test ~]# dd if=/dev/zero of=test bs=64k count=4k oflag=dsync
4096+0 records in
4096+0 records out
268435456 bytes (268 MB) copied, 5.24762 s, 51.2 MB/s
[root@test ~]# dd if=/dev/zero of=test bs=64k count=8k oflag=dsync
8192+0 records in
8192+0 records out
536870912 bytes (537 MB) copied, 10.1032 s, 53.1 MB/s
六、网络性能测试
VPS的网络性能,主要分出口和入口二个指标,入口可以用wget文件得到:
wget http://cachefly.cachefly.net/100mb.test
看下载速度,如果是11M/s,大概就是百兆口。70M/S,大概就是G口。您的VPS搭建好网站环境后,可以用其它的VPS去拽这个文件,得到出口的带宽。
[root@test ~]# wget http://cachefly.cachefly.net/100mb.test
–2012-09-18 04:37:36– http://cachefly.cachefly.net/100mb.test
Resolving cachefly.cachefly.net… 205.234.175.175
Connecting to cachefly.cachefly.net|205.234.175.175|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 104857600 (100M) [application/octet-stream]
Saving to: `100mb.test’
100%[======================================>] 104,857,600 21.3M/s in 5.0s
2012-09-18 04:37:41 (19.9 MB/s) – `100mb.test’ saved [104857600/104857600]
七、UB跑分得到综合性能
一款国外提供的linux性能专用软件,可以跑出分数来让你做对比:
wget -c http://byte-unixbench.googlecode.com/files/UnixBench5.1.3.tgz
tar zxvf UnixBench5.1.3.tgz
cd UnixBench
make
./Run
总分情况,低于400的就算性能低下;600-800是属于正常VPS水准;超过1000分性能就算给力。
BYTE UNIX Benchmarks (Version 5.1.3)
System: test: GNU/Linux
OS: GNU/Linux — 2.6.18-308.13.1.el5xen — #1 SMP Tue Aug 21 17:51:21 EDT 2012
Machine: x86_64 (x86_64)
Language: en_US.utf8 (charmap=”UTF-8″, collate=”UTF-8″)
CPU 0: Intel(R) Xeon(R) CPU X3450 @ 2.67GHz (6672.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
CPU 1: Intel(R) Xeon(R) CPU X3450 @ 2.67GHz (6672.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
01:38:02 up 7 min, 1 user, load average: 0.12, 0.14, 0.07; runlevel 3
————————————————————————
Benchmark Run: Tue Sep 18 2012 01:38:02 – 02:05:57
2 CPUs in system; running 1 parallel copy of tests
Dhrystone 2 using register variables 14620422.3 lps (10.0 s, 7 samples)
Double-Precision Whetstone 1548.7 MWIPS (9.9 s, 7 samples)
Execl Throughput 1661.8 lps (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 227880.8 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 62005.8 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 693066.6 KBps (30.0 s, 2 samples)
Pipe Throughput 356211.2 lps (10.0 s, 7 samples)
Pipe-based Context Switching 97309.7 lps (10.0 s, 7 samples)
Process Creation 3947.9 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 3791.9 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 770.6 lpm (60.1 s, 2 samples)
System Call Overhead 473896.5 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 14620422.3 1252.8
Double-Precision Whetstone 55.0 1548.7 281.6
Execl Throughput 43.0 1661.8 386.5
File Copy 1024 bufsize 2000 maxblocks 3960.0 227880.8 575.5
File Copy 256 bufsize 500 maxblocks 1655.0 62005.8 374.7
File Copy 4096 bufsize 8000 maxblocks 5800.0 693066.6 1194.9
Pipe Throughput 12440.0 356211.2 286.3
Pipe-based Context Switching 4000.0 97309.7 243.3
Process Creation 126.0 3947.9 313.3
Shell Scripts (1 concurrent) 42.4 3791.9 894.3
Shell Scripts (8 concurrent) 6.0 770.6 1284.4
System Call Overhead 15000.0 473896.5 315.9
========
System Benchmarks Index Score 505.5
————————————————————————
Benchmark Run: Tue Sep 18 2012 02:05:57 – 02:33:53
2 CPUs in system; running 2 parallel copies of tests
Dhrystone 2 using register variables 29576731.9 lps (10.0 s, 7 samples)
Double-Precision Whetstone 3106.8 MWIPS (9.9 s, 7 samples)
Execl Throughput 3266.3 lps (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 220869.5 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 56977.6 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 744735.2 KBps (30.0 s, 2 samples)
Pipe Throughput 697271.4 lps (10.0 s, 7 samples)
Pipe-based Context Switching 190257.9 lps (10.0 s, 7 samples)
Process Creation 7533.2 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 5712.8 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 831.6 lpm (60.1 s, 2 samples)
System Call Overhead 904899.3 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 29576731.9 2534.4
Double-Precision Whetstone 55.0 3106.8 564.9
Execl Throughput 43.0 3266.3 759.6
File Copy 1024 bufsize 2000 maxblocks 3960.0 220869.5 557.8
File Copy 256 bufsize 500 maxblocks 1655.0 56977.6 344.3
File Copy 4096 bufsize 8000 maxblocks 5800.0 744735.2 1284.0
Pipe Throughput 12440.0 697271.4 560.5
Pipe-based Context Switching 4000.0 190257.9 475.6
Process Creation 126.0 7533.2 597.9
Shell Scripts (1 concurrent) 42.4 5712.8 1347.4
Shell Scripts (8 concurrent) 6.0 831.6 1386.1
System Call Overhead 15000.0 904899.3 603.3
========
System Benchmarks Index Score 776.6
八、VPS的访问速度测试
这个主要测试是PING值,和观看TRACERT值,来判断速度。大概这几个网站:
站长站:ping.chinaz.com – ping.chinaz.com/tracert
卡卡网:www.webkaka.com/ping.aspx – www.webkaka.com/Tracert.aspx
国外的:www.just-ping.com 软件:speedtest.net/mini.php
国内的:www.17ce.com
综上,有测评结果来看,Hardbirch的xen 512 linux VPS还是对得起99元的价位的。
附他们的官方价格表:

最新评论