近日,看到felix021体验了一把网上流传甚广的UCloud主机又发现最近大家对e云和阿里的测评非常感兴趣,所以把felix021对UCloud体验下来的一些情况梳理写了一下内容,仅供参考。
以下是felix021的整理内容:
ucloud体验报告
最近弄了一台 ucloud.cn 的vps。准确地说应该是云主机,跟我在别处买的vps的确是有些不同的地方。
首先是注册,ucloud对密码的安全性要求太高了。其实很早之前就拿到邀请码试用过三天,但是由于对密码的要求过于复杂,刚开始几次,每次登陆之前都得重置密码,比较蛋疼;后来终于记住了,相当不容易。
然后是选配置。ucloud的最低配置是单核、2G内存、2mbps单线,显然不是面向个人vps玩家了,不过对于创业公司什么的倒是很合适。对比了一下国内另外两家云主机的同样配置,价格上也还是挺有优势的。选配置的时候有个“高性能磁盘”选项很有意思,目测是为了数据库之类对磁盘IOPS要求比较高的场合设置的,勾上了价格也没多大变化。
最终我选择的配置是双核、2G、20GB数据盘、4M双线,2700/yr。
开通主机以后就是选择系统。我图省事选了个ubuntu 12.04 64bit的。本来还做好准备像我的个人vps那样,vnc连上去在命令行下通过mount上去的iso安装,结果发现等了一会儿直接就可以开始用了,看起来应该是像openvz方案一样事先准备好了对应的template改改配置就能上。而且非常贴心的一点是,apt的默认源是ucloud自建的同步源,apt-get update和install的时候就很爽~其他的OS没试过,不过去mirror看了下,除了ubuntu,还有debian、fedora、centos等发行版的源,甚至还有个10gen(也就是mongodb他们家)的源。
进入后台管理看了下,一眼就能认出浓浓的bootstrap的味道,感觉挺无趣的,好歹用个Flat UI什么的换换小清新的口味嘛-。- 不过后台功能还是挺赞的,尤其是与 upyun、dnspod 的战略合作,可以绑定他们两家帐号,方便管理。至于upyun/dnspod的牛逼之处就不用多说了,这三家能合力打造这样的平台,前景我非常看好。
开通的时候我选择的是华东双线机房,所以给分配了2个ip,一个电信一个联通,因为域名是托管在dnspod,可以为不同请求线路返回合适的ip,很给力。ping了一下,延迟只有11ms,相当不错。ssh登上去看了下,ifconfig只看到了个内网ip,还觉得挺神奇的。后来在ucloud的主页看到,这是他们的“弹性IP”解决方案,ip不是直接绑定在vps的网卡上。设想,对于线上4台年付费的web机器进行负载均衡,某一台down了,可以马上把另一个按小时付费的备机开起来,把ip切过去,这样即减少了故障时间,又相当节省,貌似不错。
所谓“云主机”,我觉得跟传统vps/服务器的主要区别有2个:一个是可以按需选择合适的配置,并且此后还可以不断调整升级且代价很小;另一个就是底层存储是基于网络的,所在服务器挂掉也不用担心,换个地方再启动起来就好了。
去年12月在杭州参加SegmentFault举办的Hackathon的时候曾经试用过XX云的主机,他们家的特色是有自建的BGP骨干网,网络比较给力;但问题是,XX云主机的磁盘IO烂到一定境界,实在是……后来听说他们是直接用NFS作为底层存储,以及看到各种吐槽他们家IO的……
所以这次用ucloud的时候就特意关注了下磁盘性能,跑点数据列出来附在后面供参考,可以看出性能相当不错,已fio的数据为参考,顺序读取697M,顺序写入419M,随机读取 6245 IOPS,随机写入 309 IOPS。其中随机写入偏弱,可能是多备份网络延迟的原因吧,不知道选择“高性能磁盘”效果会怎样,但是就算是309 IOPS,也比服务器用的机械硬盘快多了,跟别说被甩开n条街的XX云了……很好奇他们家这个是怎么实现的,真希望ucloud的技术团队可以分享一下经验~
至于ucloud的其他方面,因为用的时间还比较短,体验不多,没什么可说的,就是总体感觉良好。ucloud提供的这项服务,对于创业团队什么的来说,的确可以算是最合适的选择了。
下附磁盘测试数据:
TEST#1 dd写入
引用
$ dd if=/dev/zero bs=1M count=4096 of=test
4096+0 records in
4096+0 records out
4294967296 bytes (4.3 GB) copied, 15.1328 s, 284 MB/s
TEST#2 hdparm -tT
引用
$ for i in 1 2 3; do sudo hdparm -tT /dev/vdb; done
/dev/vdb:
Timing cached reads: 9574 MB in 2.00 seconds = 4790.56 MB/sec
Timing buffered disk reads: 1714 MB in 3.02 seconds = 568.37 MB/sec
/dev/vdb:
Timing cached reads: 10018 MB in 2.00 seconds = 5013.55 MB/sec
Timing buffered disk reads: 1840 MB in 3.01 seconds = 611.33 MB/sec
/dev/vdb:
Timing cached reads: 9574 MB in 2.00 seconds = 4792.34 MB/sec
Timing buffered disk reads: 1908 MB in 3.00 seconds = 635.80 MB/sec
TEST #3 fio random-read
引用
$ cat random-read-test.fio
[random-read]
rw=randread
size=1g
directory=/home/felix021/test/
$ fio random-read-test.fio
random-read: (g=0): rw=randread, bs=4K-4K/4K-4K, ioengine=sync, iodepth=1
fio 1.59
Starting 1 process
random-read: Laying out IO file(s) (1 file(s) / 1024MB)
Jobs: 1 (f=1): [r] [100.0% done] [26789K/0K /s] [6540 /0 iops] [eta 00m:00s]
random-read: (groupid=0, jobs=1): err= 0: pid=10676
read : io=1024.0MB, bw=24980KB/s, iops=6245 , runt= 41976msec
clat (usec): min=77 , max=35439 , avg=155.44, stdev=237.39
lat (usec): min=78 , max=35440 , avg=155.82, stdev=237.39
bw (KB/s) : min=18384, max=28256, per=100.22%, avg=25035.02, stdev=1702.27
cpu : usr=3.42%, sys=23.48%, ctx=262433, majf=0, minf=24
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 r/w/d: total=262144/0/0, short=0/0/0
lat (usec): 100=3.05%, 250=93.84%, 500=2.44%, 750=0.22%, 1000=0.10%
lat (msec): 2=0.23%, 4=0.07%, 10=0.05%, 20=0.01%, 50=0.01%
Run status group 0 (all jobs):
READ: io=1024.0MB, aggrb=24980KB/s, minb=25579KB/s, maxb=25579KB/s, mint=41976msec, maxt=41976msec
Disk stats (read/write):
vdb: ios=260955/11, merge=0/10, ticks=25956/396, in_queue=25972, util=61.22%
TEST #4 fio random-write
$ cat random-write-test.fio
[random-write]
rw=randwrite
size=1G
directory=/home/felix021/test/
$ fio random-write-test.fio
random-write: (g=0): rw=randwrite, bs=4K-4K/4K-4K, ioengine=sync, iodepth=1
fio 1.59
Starting 1 process
random-write: Laying out IO file(s) (1 file(s) / 1024MB)
Jobs: 1 (f=1): [w] [92.5% done] [0K/1429K /s] [0 /348 iops] [eta 01m:09s]
random-write: (groupid=0, jobs=1): err= 0: pid=10733
write: io=1024.0MB, bw=1236.3KB/s, iops=309 , runt=848202msec
clat (usec): min=1 , max=1101.4K, avg=3231.07, stdev=10586.16
lat (usec): min=1 , max=1101.4K, avg=3231.53, stdev=10586.42
bw (KB/s) : min= 14, max=397248, per=95.34%, avg=1178.40, stdev=9976.63
cpu : usr=0.19%, sys=0.75%, ctx=49240, majf=0, minf=24
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 r/w/d: total=0/262144/0, short=0/0/0
lat (usec): 2=0.01%, 4=0.06%, 10=54.82%, 20=25.75%, 50=2.45%
lat (usec): 100=1.28%, 250=0.84%, 500=0.36%, 750=0.08%, 1000=0.02%
lat (msec): 2=0.04%, 4=0.05%, 10=0.29%, 20=8.87%, 50=4.58%
lat (msec): 100=0.47%, 250=0.02%, 500=0.01%, 750=0.01%, 1000=0.01%
lat (msec): 2000=0.01%
Run status group 0 (all jobs):
WRITE: io=1024.0MB, aggrb=1236KB/s, minb=1265KB/s, maxb=1265KB/s, mint=848202msec, maxt=848202msec
Disk stats (read/write):
vdb: ios=1/145156, merge=0/13152, ticks=12/3297360, in_queue=3297220, util=99.78%
TEST #5 fio sequence-read
引用
$ cat read-test.fio
[random-read]
rw=read
size=1g
directory=/home/felix021/test/
$ fio read-test.fio
random-read: (g=0): rw=read, bs=4K-4K/4K-4K, ioengine=sync, iodepth=1
fio 1.59
Starting 1 process
random-read: Laying out IO file(s) (1 file(s) / 1024MB)
Jobs: 1 (f=1)
random-read: (groupid=0, jobs=1): err= 0: pid=10798
read : io=1024.0MB, bw=697191KB/s, iops=174297 , runt= 1504msec
clat (usec): min=0 , max=16300 , avg= 4.73, stdev=97.89
lat (usec): min=1 , max=16300 , avg= 4.95, stdev=97.89
bw (KB/s) : min=615400, max=779152, per=99.97%, avg=696994.67, stdev=81877.45
cpu : usr=11.44%, sys=57.75%, ctx=3787, majf=0, minf=26
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 r/w/d: total=262144/0/0, short=0/0/0
lat (usec): 2=66.20%, 4=31.16%, 10=0.58%, 20=0.15%, 50=0.28%
lat (usec): 100=0.63%, 250=0.89%, 500=0.07%, 750=0.01%, 1000=0.01%
lat (msec): 2=0.01%, 4=0.01%, 10=0.01%, 20=0.01%
Run status group 0 (all jobs):
READ: io=1024.0MB, aggrb=697191KB/s, minb=713924KB/s, maxb=713924KB/s, mint=1504msec, maxt=1504msec
Disk stats (read/write):
vdb: ios=3697/0, merge=0/0, ticks=1280/0, in_queue=1268, util=74.56%
TEST #6 fio sequence-write
引用
$ cat write-test.fio
[random-read]
rw=write
size=1g
directory=/home/felix021/test/
$ fio write-test.fio
random-read: (g=0): rw=write, bs=4K-4K/4K-4K, ioengine=sync, iodepth=1
fio 1.59
Starting 1 process
Jobs: 1 (f=1): [W] [-.-% done] [0K/409.3M /s] [0 /102K iops] [eta 00m:00s]
random-read: (groupid=0, jobs=1): err= 0: pid=10816
write: io=1024.0MB, bw=419934KB/s, iops=104983 , runt= 2497msec
clat (usec): min=0 , max=10136 , avg= 7.71, stdev=123.62
lat (usec): min=0 , max=10136 , avg= 7.98, stdev=123.64
bw (KB/s) : min=177498, max=650096, per=110.68%, avg=464776.50, stdev=202324.17
cpu : usr=14.74%, sys=57.69%, ctx=199, majf=0, minf=27
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 r/w/d: total=0/262144/0, short=0/0/0
lat (usec): 2=0.08%, 4=36.39%, 10=58.08%, 20=4.91%, 50=0.38%
lat (usec): 100=0.07%, 250=0.01%, 500=0.01%, 750=0.01%, 1000=0.01%
lat (msec): 2=0.01%, 4=0.01%, 10=0.04%, 20=0.01%
Run status group 0 (all jobs):
WRITE: io=1024.0MB, aggrb=419934KB/s, minb=430012KB/s, maxb=430012KB/s, mint=2497msec, maxt=2497msec
Disk stats (read/write):
vdb: ios=0/1382, merge=0/11, ticks=0/219176, in_queue=246612, util=77.43%
--
给felix021打个广告:
转载请注明出自
http://www.felix021.com/blog/read.php?2119 ,如是转载文则注明原出处,谢谢
Google Reader 订阅 点击这里,RSS地址:
http://www.felix021.com/blog/feed.php 。