0x01 前言

我的sugarhosts账户创建于2015年11月,用了1年,而后的3年均在layerstack(原pachosting)租用服务器。当时的sugarhosts还没有CN2线路,技术如此,他们家的网络状况也是非常好,那怕性能有所欠缺,但网络可以弥补这部分的缺陷。

因为我对layerstack(原pachosting)产生了厌恶感,所以在最近2个月已经将业务从layerstack(原pachosting)迁出,目前我博客的前端使用sugarhosts美国机房CN2线路的SSD VPS。

在迁移之前,我比较过多家服务商。因为之前一直使用香港数据中心的VPS,感受过超低延迟和大带宽之后,我的心也十分向往香港数据中心的VPS。目前比较理想的厂商是cubecloud,可惜我有些服务在他们的VPS上无法运行,不知道是系统问题还是其他原因。

最终,我选择了sugarhosts作为我博客的前端节点。经过一个月的观察,连接速度不错,虽然出现一些波动,但总体来说还是能接受的。

0x02 配置

sugarhosts CN2线路的VPS有以下套餐:

  • VSSD L1
    • 内存:768M
    • vCPU:1
    • SSD硬盘:10GB
    • 月流量:1TB
    • 月费:99元
  • VSSD L2
    • 内存:1.5GB
    • vCPU:1
    • SSD硬盘:20GB
    • 月流量:2TB
    • 月费:189元
  • VSSD L3
    • 内存:3GB
    • vCPU:2
    • SSD硬盘:40GB
    • 月流量:3TB
    • 月费:319元
  • VSSD L4
    • 内存:6GB
    • vCPU:4
    • SSD硬盘:80GB
    • 月流量:4TB
    • 月费:539元

他们不但有一个IPv4,还有8个IPv6的IP地址。

而我的套餐为VSSD L1,经过实际使用一个月后发现磁盘空间是一个薄弱点,其次是内存,如果各位主要用来建站,那么建议选择VSSD L2或者更好的套餐。因为我的这个VPS只是作为前端节点,而不需要运行后端程序和存放源码文件,所以磁盘空间对于我来说并不会造成影响,另外需要注意内存大小,必要的时候需要自行调整SWAP的大小,防止安装或编译软件的时候因内存不足而被kill。

与其他拥有美国机房的厂商相比较,sugarhosts并不是性价比最高的,无论是从内存大小、host的CPU型号还是性能评分,都处于中等偏下的水平。但得益于网络的稳定性与可靠性,运行一个nginx对外提供web服务是最好不过了。

以下是他们host所使用的CPU:

[root@sh-us-1 ~]# cat /proc/cpuinfo 
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 62
model name  : Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
stepping    : 4
microcode   : 0x428
cpu MHz     : 2500.004
cache size  : 25600 KB
physical id : 0
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu de tsc msr pae mce cx8 sep mca cmov pat clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c rdrand hypervisor lahf_lm ida arat epb xsaveopt pln pts dtherm fsgsbase erms
bogomips    : 5000.00
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

这型号的CPU还没有我家里T620服务器所使用的好,我服务器使用的是E5-2680 v2,可以看出他们的host已经很老了。

0x03 网络测试

0x03.1 ping

--- us1 ping statistics ---
20435 packets transmitted, 19765 received, 3% packet loss, time 20442724ms
rtt min/avg/max/mdev = 206.032/241.459/424.430/27.679 ms

长ping共发出20435个数据包,共收到19765次回应,3%的丢包率,平均延迟为241.459ms,除了丢包率较高,延迟完全能接受,属于正常水平。

0x03.2 wget

wget下载测试分为2部分,分别从我家里下载文件与从服务器下载文件,而服务端下载的文件为vultr.com的1gb测试文件:

[root@sh-us-1 temp]# wget https://hnd-jp-ping.vultr.com/vultr.com.1000MB.bin
--2019-07-01 10:04:14--  https://hnd-jp-ping.vultr.com/vultr.com.1000MB.bin
正在解析主机 hnd-jp-ping.vultr.com (hnd-jp-ping.vultr.com)... 108.61.201.151
正在连接 hnd-jp-ping.vultr.com (hnd-jp-ping.vultr.com)|108.61.201.151|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1048576000 (1000M) [application/octet-stream]
正在保存至: “vultr.com.1000MB.bin”

100%[==============================================>] 1,048,576,000 18.2MB/s 用时 61s    

2019-07-01 10:05:16 (16.4 MB/s) - 已保存 “vultr.com.1000MB.bin” [1048576000/1048576000])

下载速度为18.2MB/s,速度比较理想。以下为上行带宽:

[root@web temp]# wget -U 't1' https://www.enginx.cn/vultr.com.1000MB.bin
--2019-07-01 18:07:44--  https://www.enginx.cn/vultr.com.1000MB.bin
正在解析主机 www.enginx.cn (www.enginx.cn)... 192.154.223.68
正在连接 www.enginx.cn (www.enginx.cn)|192.154.223.68|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1048576000 (1000M) [application/octet-stream]
正在保存至: “vultr.com.1000MB.bin”

55% [================>                           ] 576,970,421 1.19MB/s 剩余 6m 37s

上行被限制在1MB/s,也就是10Mbps,这是一个非常不好的体验,甚至我在香港租用的VPS都是限制在5MB/s,也就是40Mbps甚至50Mbps。作为CN2线路的VPS,限速是可以理解的,但是1MB/s确实太低,3~5MB/s比较理想。

0x03.3 路由追踪

路由追踪也和wget下载测试一样分为两部分,以下是从服务器到我家宽带的追踪结果:

[root@web temp]# traceroute 192.154.223.68
traceroute to 192.154.223.68 (192.154.223.68), 30 hops max, 60 byte packets
 1  pfSense.t.com (10.1.1.1)  0.108 ms  0.116 ms  0.132 ms
 2  113.116.176.1 (113.116.176.1)  18.622 ms  18.621 ms  18.707 ms
 3  61.146.244.201 (61.146.244.201)  2.148 ms 61.146.244.209 (61.146.244.209)  2.192 ms 202.105.153.173 (202.105.153.173)  4.168 ms
 4  183.56.65.62 (183.56.65.62)  8.593 ms 183.56.65.14 (183.56.65.14)  7.008 ms 183.56.65.22 (183.56.65.22)  7.021 ms
 5  59.43.80.17 (59.43.80.17)  6.459 ms 59.43.80.21 (59.43.80.21)  8.802 ms  8.916 ms
 6  59.43.130.110 (59.43.130.110)  10.119 ms  9.282 ms 59.43.18.242 (59.43.18.242)  7.910 ms
 7  59.43.130.110 (59.43.130.110)  9.485 ms  8.386 ms 59.43.187.122 (59.43.187.122)  15.016 ms
 8  59.43.187.142 (59.43.187.142)  6.466 ms 59.43.187.122 (59.43.187.122)  10.737 ms 59.43.182.73 (59.43.182.73)  163.428 ms
 9  * 59.43.182.77 (59.43.182.77)  158.278 ms *
10  192.154.223.68 (192.154.223.68)  167.311 ms

第4跳是深圳的最后一跳,紧接着到广州CN2出口,最后直达美国。

因为我家宽带禁ping,第9跳后面应该到我家的,但是因为超时,所以我没放上来。从第3跳开始到第7跳均为CN2线路,先到达广州再到深圳。以下为我家到服务器的追踪结果:

[root@sh-us-1 temp]# traceroute 113.116.176.108
traceroute to 113.116.176.108 (113.116.176.108), 30 hops max, 60 byte packets
 1  * * *
 2  * * *
 3  59.43.182.74 (59.43.182.74)  146.054 ms  146.005 ms 59.43.189.41 (59.43.189.41)  156.465 ms
 4  59.43.187.89 (59.43.187.89)  151.777 ms 59.43.187.121 (59.43.187.121)  163.423 ms 59.43.187.141 (59.43.187.141)  161.768 ms
 5  59.43.130.145 (59.43.130.145)  168.070 ms 59.43.130.125 (59.43.130.125)  193.882 ms 59.43.130.105 (59.43.130.105)  157.516 ms
 6  59.43.20.66 (59.43.20.66)  161.997 ms 59.43.19.254 (59.43.19.254)  161.038 ms 59.43.20.66 (59.43.20.66)  155.814 ms
 7  59.43.30.249 (59.43.30.249)  175.917 ms * *
 8  61.146.244.202 (61.146.244.202)  173.054 ms 61.146.244.206 (61.146.244.206)  173.628 ms *
 9  202.105.159.194 (202.105.159.194)  167.034 ms 202.105.159.190 (202.105.159.190)  156.156 ms *

来回都是CN2线路,网络非常理想,就是少有丢包。

0x03.4 speedtest

# 香港STC
[root@sh-us-1 temp]# speedtest-cli --server 1536
Retrieving speedtest.net configuration...
Testing from Vivid Hosting (192.154.223.68)...
Retrieving speedtest.net server list...
Retrieving information for the selected server...
Hosted by STC (Hong Kong) [15481.57 km]: 253.466 ms
Testing download speed................................................................................
Download: 28.05 Mbit/s
Testing upload speed......................................................................................................
Upload: 9.16 Mbit/s

# 广州电信
[root@sh-us-1 temp]# speedtest-cli --server 17251
Retrieving speedtest.net configuration...
Testing from Vivid Hosting (192.154.223.68)...
Retrieving speedtest.net server list...
Retrieving information for the selected server...
Hosted by ChinaTelecom-GZ (Guangzhou) [15379.33 km]: 417.802 ms
Testing download speed................................................................................
Download: 60.90 Mbit/s
Testing upload speed......................................................................................................
Upload: 9.64 Mbit/s

# 福建联通
[root@sh-us-1 temp]# speedtest-cli --server 4884
Retrieving speedtest.net configuration...
Testing from Vivid Hosting (192.154.223.68)...
Retrieving speedtest.net server list...
Retrieving information for the selected server...
Hosted by China Unicom FuJian (Fuzhou) [15041.42 km]: 520.147 ms
Testing download speed................................................................................
Download: 28.26 Mbit/s
Testing upload speed......................................................................................................
Upload: 1.20 Mbit/s

# 上海移动
[root@sh-us-1 temp]# speedtest-cli --server 25637
Retrieving speedtest.net configuration...
Testing from Vivid Hosting (192.154.223.68)...
Retrieving speedtest.net server list...
Retrieving information for the selected server...
Hosted by Chinamobile-5G (Shanghai) [14451.67 km]: 172.18 ms
Testing download speed................................................................................
Download: 12.19 Mbit/s
Testing upload speed......................................................................................................
Upload: 4.80 Mbit/s

以上为4个节点的测试结果,结果如下:

  • 香港STC:
    • 下行:28.05 Mbit/s
    • 上行:9.16 Mbit/s
  • 广州电信:
    • 下行:60.90 Mbit/s
    • 上行:9.64 Mbit/s
  • 福建联通:
    • 下行:28.26 Mbit/s
    • 上行:1.20 Mbit/s
  • 上海移动:
    • 下行:12.19 Mbit/s
    • 上行:4.80 Mbit/s

我们看重的上行速度没什么亮点,对于小站点来说是足够的。

0x04 性能测试

0x04.1 dd磁盘测试

[root@sh-us-1 temp]# dd bs=1M count=1024 if=/dev/zero of=1gb-1.test conv=fdatasync
记录了1024+0 的读入
记录了1024+0 的写出
1073741824字节(1.1 GB)已复制,1.89108 秒,568 MB/秒

[root@sh-us-1 temp]# dd bs=1M count=1024 if=/dev/zero of=1gb-2.test conv=fdatasync
记录了1024+0 的读入
记录了1024+0 的写出
1073741824字节(1.1 GB)已复制,1.91433 秒,561 MB/秒

[root@sh-us-1 temp]# dd bs=1M count=1024 if=/dev/zero of=1gb-3.test conv=fdatasync
记录了1024+0 的读入
记录了1024+0 的写出
1073741824字节(1.1 GB)已复制,1.91181 秒,562 MB/秒

[root@sh-us-1 temp]# dd bs=1M count=1024 if=/dev/zero of=1gb-4.test conv=fdatasync
记录了1024+0 的读入
记录了1024+0 的写出
1073741824字节(1.1 GB)已复制,1.93755 秒,554 MB/秒

[root@sh-us-1 temp]# dd bs=1M count=1024 if=/dev/zero of=1gb-5.test conv=fdatasync
记录了1024+0 的读入
记录了1024+0 的写出
1073741824字节(1.1 GB)已复制,1.72177 秒,624 MB/秒

SSD硬盘的速度让我眼前一亮,不知道是不是命中了SSD的缓存还是因为其他原因,这比大多数VPS服务商的硬盘IO速度有绝对的优势。

0x04.2 fio

CRC 加密测试:

[root@sh-us-1 fio]# ./fio fio -crctest
md5:          398.22 MiB/sec
crc64:        271.56 MiB/sec
crc32:        248.16 MiB/sec
crc32c:      6066.21 MiB/sec
crc16:        275.46 MiB/sec
crc7:         280.72 MiB/sec
sha1:         306.25 MiB/sec
sha256:       133.03 MiB/sec
sha512:       206.03 MiB/sec
xxhash:      3067.59 MiB/sec
murmur3:     1740.54 MiB/sec
jhash:       1520.96 MiB/sec
fnv:         4550.63 MiB/sec
sha3-224:      70.72 MiB/sec
sha3-256:      68.04 MiB/sec
sha3-384:      51.18 MiB/sec
sha3-512:      37.45 MiB/sec

4k随机读写测试:

[root@sh-us-1 fio]# ./fio -filename=/root/bench/test.fio  -direct=1 -rw=rw -bs=4k -size 2G -numjobs=8 -runtime=30 -group_reporting -name=file
file: (g=0): rw=rw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=1
...
fio-3.14-6-g97134
Starting 8 processes
file: Laying out IO file (1 file / 2048MiB)
Jobs: 8 (f=8): [M(8)][100.0%][r=16.4MiB/s,w=16.7MiB/s][r=4187,w=4279 IOPS][eta 00m:00s]
file: (groupid=0, jobs=8): err= 0: pid=23713: Mon Jul  1 10:58:15 2019
  read: IOPS=4168, BW=16.3MiB/s (17.1MB/s)(489MiB/30009msec)
    clat (nsec): min=0, max=28570k, avg=978683.62, stdev=1137667.40
     lat (nsec): min=0, max=28570k, avg=982019.14, stdev=1137768.47
    clat percentiles (nsec):
     |  1.00th=[       0],  5.00th=[   50944], 10.00th=[  140288],
     | 20.00th=[  173056], 30.00th=[  203776], 40.00th=[  248832],
     | 50.00th=[  428032], 60.00th=[  913408], 70.00th=[ 1318912],
     | 80.00th=[ 1761280], 90.00th=[ 2473984], 95.00th=[ 3096576],
     | 99.00th=[ 4489216], 99.50th=[ 5144576], 99.90th=[ 8454144],
     | 99.95th=[12255232], 99.99th=[23724032]
   bw (  KiB/s): min= 7884, max=19036, per=99.98%, avg=16668.89, stdev=212.47, samples=479
   iops        : min= 1970, max= 4756, avg=4166.24, stdev=53.09, samples=479
  write: IOPS=4169, BW=16.3MiB/s (17.1MB/s)(489MiB/30009msec)
    clat (nsec): min=0, max=35325k, avg=910473.41, stdev=1106693.12
     lat (nsec): min=0, max=35329k, avg=913965.75, stdev=1106792.18
    clat percentiles (nsec):
     |  1.00th=[       0],  5.00th=[   30336], 10.00th=[  110080],
     | 20.00th=[  129536], 30.00th=[  146432], 40.00th=[  173056],
     | 50.00th=[  325632], 60.00th=[  847872], 70.00th=[ 1236992],
     | 80.00th=[ 1695744], 90.00th=[ 2375680], 95.00th=[ 2998272],
     | 99.00th=[ 4423680], 99.50th=[ 5013504], 99.90th=[ 7700480],
     | 99.95th=[10944512], 99.99th=[16580608]
   bw (  KiB/s): min= 7796, max=19782, per=99.98%, avg=16674.45, stdev=234.35, samples=479
   iops        : min= 1948, max= 4944, avg=4167.65, stdev=58.56, samples=479
  lat (nsec)   : 2=3.72%, 10=0.01%, 100=0.01%, 250=0.01%, 500=0.01%
  lat (nsec)   : 750=0.01%, 1000=0.01%
  lat (usec)   : 2=0.01%, 4=0.02%, 10=0.06%, 20=0.11%, 50=1.86%
  lat (usec)   : 100=1.64%, 250=37.09%, 500=7.46%, 750=5.02%, 1000=5.90%
  lat (msec)   : 2=21.69%, 4=13.73%, 10=1.63%, 20=0.06%, 50=0.01%
  cpu          : usr=1.21%, sys=4.07%, ctx=432511, majf=0, minf=276
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwts: total=125090,125127,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
   READ: bw=16.3MiB/s (17.1MB/s), 16.3MiB/s-16.3MiB/s (17.1MB/s-17.1MB/s), io=489MiB (512MB), run=30009-30009msec
  WRITE: bw=16.3MiB/s (17.1MB/s), 16.3MiB/s-16.3MiB/s (17.1MB/s-17.1MB/s), io=489MiB (513MB), run=30009-30009msec

Disk stats (read/write):
  xvda1: ios=126356/124412, merge=24/87, ticks=27843/23111, in_queue=50831, util=84.71%

32k随机读写测试:

[root@sh-us-1 fio]# ./fio -filename=/root/bench/test.fio  -direct=1 -rw=rw -bs=32k -size 2G -numjobs=8 -runtime=30 -group_reporting -name=file
file: (g=0): rw=rw, bs=(R) 32.0KiB-32.0KiB, (W) 32.0KiB-32.0KiB, (T) 32.0KiB-32.0KiB, ioengine=psync, iodepth=1
...
fio-3.14-6-g97134
Starting 8 processes
file: Laying out IO file (1 file / 2048MiB)
Jobs: 8 (f=8): [M(8)][100.0%][r=96.9MiB/s,w=97.4MiB/s][r=3101,w=3117 IOPS][eta 00m:00s]
file: (groupid=0, jobs=8): err= 0: pid=23801: Mon Jul  1 11:00:09 2019
  read: IOPS=3641, BW=114MiB/s (119MB/s)(3414MiB/30004msec)
    clat (nsec): min=0, max=53801k, avg=1118593.62, stdev=1320857.18
     lat (nsec): min=0, max=53804k, avg=1121970.87, stdev=1320983.15
    clat percentiles (nsec):
     |  1.00th=[       0],  5.00th=[   76288], 10.00th=[  160768],
     | 20.00th=[  195584], 30.00th=[  230400], 40.00th=[  284672],
     | 50.00th=[  514048], 60.00th=[ 1044480], 70.00th=[ 1499136],
     | 80.00th=[ 2007040], 90.00th=[ 2801664], 95.00th=[ 3522560],
     | 99.00th=[ 5210112], 99.50th=[ 5996544], 99.90th=[ 8847360],
     | 99.95th=[11075584], 99.99th=[27394048]
   bw (  KiB/s): min=48537, max=137792, per=99.99%, avg=116500.38, stdev=1890.89, samples=479
   iops        : min= 1515, max= 4306, avg=3640.28, stdev=59.12, samples=479
  write: IOPS=3642, BW=114MiB/s (119MB/s)(3415MiB/30004msec)
    clat (nsec): min=0, max=53822k, avg=1047513.20, stdev=1295905.18
     lat (nsec): min=0, max=53827k, avg=1051506.78, stdev=1296051.38
    clat percentiles (nsec):
     |  1.00th=[       0],  5.00th=[   41216], 10.00th=[  132096],
     | 20.00th=[  152576], 30.00th=[  171008], 40.00th=[  201728],
     | 50.00th=[  415744], 60.00th=[  970752], 70.00th=[ 1417216],
     | 80.00th=[ 1925120], 90.00th=[ 2703360], 95.00th=[ 3457024],
     | 99.00th=[ 5144576], 99.50th=[ 5931008], 99.90th=[ 8847360],
     | 99.95th=[10813440], 99.99th=[24510464]
   bw (  KiB/s): min=49117, max=142290, per=99.98%, avg=116516.23, stdev=2030.49, samples=479
   iops        : min= 1533, max= 4444, avg=3640.61, stdev=63.46, samples=479
  lat (nsec)   : 2=3.10%, 20=0.01%, 100=0.01%, 500=0.01%, 750=0.01%
  lat (nsec)   : 1000=0.01%
  lat (usec)   : 2=0.01%, 4=0.02%, 10=0.05%, 20=0.08%, 50=1.49%
  lat (usec)   : 100=1.74%, 250=34.20%, 500=9.77%, 750=4.38%, 1000=4.98%
  lat (msec)   : 2=20.62%, 4=16.54%, 10=2.95%, 20=0.04%, 50=0.02%
  lat (msec)   : 100=0.01%
  cpu          : usr=1.08%, sys=4.12%, ctx=378119, majf=0, minf=276
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwts: total=109250,109275,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
   READ: bw=114MiB/s (119MB/s), 114MiB/s-114MiB/s (119MB/s-119MB/s), io=3414MiB (3580MB), run=30004-30004msec
  WRITE: bw=114MiB/s (119MB/s), 114MiB/s-114MiB/s (119MB/s-119MB/s), io=3415MiB (3581MB), run=30004-30004msec

Disk stats (read/write):
  xvda1: ios=109791/109181, merge=0/52, ticks=26751/23173, in_queue=49811, util=84.83%

1m随机读写测试:

[root@sh-us-1 fio]# ./fio -filename=/root/bench/test.fio  -direct=1 -rw=rw -bs=1m -size 2G -numjobs=8 -runtime=30 -group_reporting -name=file
file: (g=0): rw=rw, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=psync, iodepth=1
...
fio-3.14-6-g97134
Starting 8 processes
file: Laying out IO file (1 file / 2048MiB)
Jobs: 5 (f=5): [_(2),M(5),_(1)][100.0%][r=723MiB/s,w=695MiB/s][r=723,w=695 IOPS][eta 00m:00s]
file: (groupid=0, jobs=8): err= 0: pid=23847: Mon Jul  1 11:01:15 2019
  read: IOPS=726, BW=726MiB/s (762MB/s)(8029MiB/11052msec)
    clat (nsec): min=0, max=31242k, avg=5491010.57, stdev=5443374.50
     lat (nsec): min=0, max=31252k, avg=5495435.02, stdev=5443915.97
    clat percentiles (usec):
     |  1.00th=[  105],  5.00th=[  578], 10.00th=[  676], 20.00th=[  865],
     | 30.00th=[ 1139], 40.00th=[ 1549], 50.00th=[ 2376], 60.00th=[ 6063],
     | 70.00th=[ 8455], 80.00th=[10552], 90.00th=[13566], 95.00th=[15795],
     | 99.00th=[20579], 99.50th=[22676], 99.90th=[26870], 99.95th=[27395],
     | 99.99th=[31327]
   bw (  KiB/s): min=646360, max=898163, per=100.00%, avg=744960.76, stdev=7601.89, samples=168
   iops        : min=  627, max=  874, avg=724.86, stdev= 7.41, samples=168
  write: IOPS=755, BW=756MiB/s (793MB/s)(8355MiB/11052msec)
    clat (nsec): min=0, max=33678k, avg=5132509.65, stdev=5374771.99
     lat (nsec): min=0, max=33700k, avg=5171278.32, stdev=5377058.96
    clat percentiles (usec):
     |  1.00th=[  249],  5.00th=[  529], 10.00th=[  619], 20.00th=[  725],
     | 30.00th=[  873], 40.00th=[ 1139], 50.00th=[ 1778], 60.00th=[ 5538],
     | 70.00th=[ 8029], 80.00th=[10159], 90.00th=[13042], 95.00th=[15401],
     | 99.00th=[20055], 99.50th=[22152], 99.90th=[26870], 99.95th=[28705],
     | 99.99th=[33817]
   bw (  KiB/s): min=583208, max=1024967, per=100.00%, avg=777501.52, stdev=14604.67, samples=168
   iops        : min=  567, max=  998, avg=756.67, stdev=14.28, samples=168
  lat (nsec)   : 2=0.50%
  lat (usec)   : 2=0.01%, 4=0.01%, 10=0.02%, 20=0.01%, 50=0.08%
  lat (usec)   : 100=0.11%, 250=0.46%, 500=2.25%, 750=14.73%, 1000=12.27%
  lat (msec)   : 2=18.90%, 4=6.44%, 10=22.52%, 20=20.53%, 50=1.16%
  cpu          : usr=0.64%, sys=6.97%, ctx=28209, majf=0, minf=273
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwts: total=8029,8355,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
   READ: bw=726MiB/s (762MB/s), 726MiB/s-726MiB/s (762MB/s-762MB/s), io=8029MiB (8419MB), run=11052-11052msec
  WRITE: bw=756MiB/s (793MB/s), 756MiB/s-756MiB/s (793MB/s-793MB/s), io=8355MiB (8761MB), run=11052-11052msec

Disk stats (read/write):
  xvda1: ios=63653/66090, merge=0/2, ticks=36992/50839, in_queue=87773, util=90.37%

IO结果不太理想,虽然通过dd测出的结果让人惊艳,但是小块的读写与我之前用的或者测试过的VPS稍微逊色。

0x04.3 ramsmp

[root@sh-us-1 ramsmp-3.5.0]# ./ramsmp -b 1
RAMspeed/SMP (Linux) v3.5.0 by Rhett M. Hollander and Paul V. Bolotoff, 2002-09

8Gb per pass mode, 2 processes

INTEGER & WRITING         1 Kb block: 16588.96 MB/s
INTEGER & WRITING         2 Kb block: 16817.68 MB/s
INTEGER & WRITING         4 Kb block: 15984.19 MB/s
INTEGER & WRITING         8 Kb block: 16013.87 MB/s
INTEGER & WRITING        16 Kb block: 16980.72 MB/s
INTEGER & WRITING        32 Kb block: 15955.49 MB/s
INTEGER & WRITING        64 Kb block: 14812.77 MB/s
INTEGER & WRITING       128 Kb block: 14923.09 MB/s
INTEGER & WRITING       256 Kb block: 14605.57 MB/s
INTEGER & WRITING       512 Kb block: 13513.23 MB/s
INTEGER & WRITING      1024 Kb block: 13260.21 MB/s
INTEGER & WRITING      2048 Kb block: 13226.99 MB/s
INTEGER & WRITING      4096 Kb block: 12993.40 MB/s
INTEGER & WRITING      8192 Kb block: 10703.56 MB/s
INTEGER & WRITING     16384 Kb block: 7623.11 MB/s
INTEGER & WRITING     32768 Kb block: 6703.11 MB/s

[root@sh-us-1 ramsmp-3.5.0]# ./ramsmp -b 2
RAMspeed/SMP (Linux) v3.5.0 by Rhett M. Hollander and Paul V. Bolotoff, 2002-09

8Gb per pass mode, 2 processes

INTEGER & READING         1 Kb block: 35697.43 MB/s
INTEGER & READING         2 Kb block: 36092.81 MB/s
INTEGER & READING         4 Kb block: 35323.76 MB/s
INTEGER & READING         8 Kb block: 35577.12 MB/s
INTEGER & READING        16 Kb block: 35124.79 MB/s
INTEGER & READING        32 Kb block: 31243.48 MB/s
INTEGER & READING        64 Kb block: 24091.84 MB/s
INTEGER & READING       128 Kb block: 23178.25 MB/s
INTEGER & READING       256 Kb block: 20936.16 MB/s
INTEGER & READING       512 Kb block: 18757.11 MB/s
INTEGER & READING      1024 Kb block: 18427.15 MB/s
INTEGER & READING      2048 Kb block: 18004.59 MB/s
INTEGER & READING      4096 Kb block: 17311.92 MB/s
INTEGER & READING      8192 Kb block: 14574.13 MB/s
INTEGER & READING     16384 Kb block: 8531.38 MB/s
INTEGER & READING     32768 Kb block: 7850.46 MB/s

[root@sh-us-1 ramsmp-3.5.0]# ./ramsmp -b 3
RAMspeed/SMP (Linux) v3.5.0 by Rhett M. Hollander and Paul V. Bolotoff, 2002-09

8Gb per pass mode, 2 processes

INTEGER   Copy:      8010.82 MB/s
INTEGER   Scale:     8563.40 MB/s
INTEGER   Add:       8704.68 MB/s
INTEGER   Triad:     8669.05 MB/s
---
INTEGER   AVERAGE:   8486.99 MB/s

[root@sh-us-1 ramsmp-3.5.0]# ./ramsmp -b 4
RAMspeed/SMP (Linux) v3.5.0 by Rhett M. Hollander and Paul V. Bolotoff, 2002-09

8Gb per pass mode, 2 processes

FL-POINT & WRITING        1 Kb block: 16515.99 MB/s
FL-POINT & WRITING        2 Kb block: 16737.17 MB/s
FL-POINT & WRITING        4 Kb block: 16532.25 MB/s
FL-POINT & WRITING        8 Kb block: 16611.63 MB/s
FL-POINT & WRITING       16 Kb block: 16789.63 MB/s
FL-POINT & WRITING       32 Kb block: 15937.52 MB/s
FL-POINT & WRITING       64 Kb block: 15136.00 MB/s
FL-POINT & WRITING      128 Kb block: 14878.08 MB/s
FL-POINT & WRITING      256 Kb block: 14565.83 MB/s
FL-POINT & WRITING      512 Kb block: 13459.64 MB/s
FL-POINT & WRITING     1024 Kb block: 14038.54 MB/s
FL-POINT & WRITING     2048 Kb block: 13232.53 MB/s
FL-POINT & WRITING     4096 Kb block: 12221.50 MB/s
FL-POINT & WRITING     8192 Kb block: 10713.95 MB/s
FL-POINT & WRITING    16384 Kb block: 7668.75 MB/s
FL-POINT & WRITING    32768 Kb block: 6554.59 MB/s

[root@sh-us-1 ramsmp-3.5.0]# ./ramsmp -b 5
RAMspeed/SMP (Linux) v3.5.0 by Rhett M. Hollander and Paul V. Bolotoff, 2002-09

8Gb per pass mode, 2 processes

FL-POINT & READING        1 Kb block: 18449.67 MB/s
FL-POINT & READING        2 Kb block: 18426.17 MB/s
FL-POINT & READING        4 Kb block: 18367.33 MB/s
FL-POINT & READING        8 Kb block: 18190.72 MB/s
FL-POINT & READING       16 Kb block: 18574.97 MB/s
FL-POINT & READING       32 Kb block: 18639.08 MB/s
FL-POINT & READING       64 Kb block: 15813.15 MB/s
FL-POINT & READING      128 Kb block: 14461.28 MB/s
FL-POINT & READING      256 Kb block: 17143.23 MB/s
FL-POINT & READING      512 Kb block: 17189.40 MB/s
FL-POINT & READING     1024 Kb block: 17202.46 MB/s
FL-POINT & READING     2048 Kb block: 16473.04 MB/s
FL-POINT & READING     4096 Kb block: 15973.57 MB/s
FL-POINT & READING     8192 Kb block: 13705.34 MB/s
FL-POINT & READING    16384 Kb block: 8879.84 MB/s
FL-POINT & READING    32768 Kb block: 8031.89 MB/s

[root@sh-us-1 ramsmp-3.5.0]# ./ramsmp -b 6
RAMspeed/SMP (Linux) v3.5.0 by Rhett M. Hollander and Paul V. Bolotoff, 2002-09

8Gb per pass mode, 2 processes

FL-POINT  Copy:      6496.01 MB/s
FL-POINT  Scale:     6531.00 MB/s
FL-POINT  Add:       8331.06 MB/s
FL-POINT  Triad:     8131.10 MB/s
---
FL-POINT  AVERAGE:   7372.29 MB/s

不知道为何,内存的性能比较低。

0x04.4 Unix Benchmark

   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
   #    #  # #  #  #    ##            #####   #####   # #  #  #       ######
   #    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
    ####   #    #  #  #    #          #####   ######  #    #   ####   #    #

   Version 5.1.3                      Based on the Byte Magazine Unix Benchmark

   Multi-CPU version                  Version 5 revisions by Ian Smith,
                                      Sunnyvale, CA, USA
   January 13, 2011                   johantheghost at yahoo period com

------------------------------------------------------------------------------
   Use directories for:
      * File I/O tests (named fs***) = /root/temp/byte-unixbench/UnixBench/tmp
      * Results                      = /root/temp/byte-unixbench/UnixBench/results
------------------------------------------------------------------------------


1 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

1 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

1 x Execl Throughput  1 2 3

1 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

1 x File Copy 256 bufsize 500 maxblocks  1 2 3

1 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

1 x Pipe Throughput  1 2 3 4 5 6 7 8 9 10

1 x Pipe-based Context Switching  1 2 3 4 5 6 7 8 9 10

1 x Process Creation  1 2 3

1 x System Call Overhead  1 2 3 4 5 6 7 8 9 10

1 x Shell Scripts (1 concurrent)  1 2 3

1 x Shell Scripts (8 concurrent)  1 2 3

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: sh-us-1: GNU/Linux
   OS: GNU/Linux -- 3.10.0-123.9.2.el7.x86_64 -- #1 SMP Tue Oct 28 18:05:26 UTC 2014
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz (5000.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   11:08:52 up 16 days, 20:12,  2 users,  load average: 0.21, 0.73, 0.65; runlevel 2019-06-14

------------------------------------------------------------------------
Benchmark Run: Ò» 7ÔÂ 01 2019 11:08:52 - 11:37:05
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       24455031.5 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     3296.1 MWIPS (9.9 s, 7 samples)
Execl Throughput                                702.9 lps   (29.8 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        109630.4 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           28650.4 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        374136.3 KBps  (30.0 s, 2 samples)
Pipe Throughput                              146976.2 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  35907.4 lps   (10.0 s, 7 samples)
Process Creation                               1601.7 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   1204.4 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    163.3 lpm   (60.2 s, 2 samples)
System Call Overhead                          93582.1 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   24455031.5   2095.5
Double-Precision Whetstone                       55.0       3296.1    599.3
Execl Throughput                                 43.0        702.9    163.5
File Copy 1024 bufsize 2000 maxblocks          3960.0     109630.4    276.8
File Copy 256 bufsize 500 maxblocks            1655.0      28650.4    173.1
File Copy 4096 bufsize 8000 maxblocks          5800.0     374136.3    645.1
Pipe Throughput                               12440.0     146976.2    118.1
Pipe-based Context Switching                   4000.0      35907.4     89.8
Process Creation                                126.0       1601.7    127.1
Shell Scripts (1 concurrent)                     42.4       1204.4    284.1
Shell Scripts (8 concurrent)                      6.0        163.3    272.2
System Call Overhead                          15000.0      93582.1     62.4
                                                                   ========
System Benchmarks Index Score                                         242.5

通过跑分可以看出,即使是E5-2670 v2也只有242.5分,这比正常值的一半还要低,我觉得这VPS是被限制了CPU频率或者通过其他技术手段限制了CPU性能。

0x05 结语

首先,这款VPS月付需要99元人民币,加上汇率的波动,我最近一次续费花了100块多几毛。这个价格的VPS仅有网络连接质量可圈可点,而上行速度是被限制的,其他性能指标也一般般,甚至低于其他友商。

为了规避风险,我采用按月付费的模式续用。我对sugarhosts这家厂商并没有任何不良感觉,虽然以前只用过一年左右,但我觉得他们的客服回复快速、专业。在目前无可靠的VPS厂商的情况下,我还是会选择sugarhosts。

如果你有购买sugarhosts VPS的需求,欢迎点击以下推广链接,在你购买的同时我会收到佣金,以便让我减少博客运营的压力:

如果你有其他更优的VPS厂商或者可靠的香港数据中心推荐,欢迎通过右上角的二维码加入QQ群或通过本页底部的电子邮箱与我取得联系。