腾讯云主机的 IO 惨不忍睹

2019-09-29 13:48:15 +08:00
 lihongjie0209

1U1G1M 的主机, 活动的时候购买的,随机 IO 不到 10M/s, 大家测试一下自己的服务器, 看看是不是活动主机的 IO 都是这么差。

测试流程

yum install sysbench
sysbench fileio --file-total-size=2G --file-num=100  --file-test-mode=rndrw prepare
sysbench fileio --file-total-size=2G --file-num=100  --file-test-mode=rndrw run
[root@VM_45_207_centos ~]# sysbench fileio --file-total-size=2G --file-num=100  --file-test-mode=rndrw run
sysbench 1.0.17 (using system LuaJIT 2.0.4)

Running the test with following options:
Number of threads: 1
Initializing random number generator from current time


Extra file open flags: (none)
100 files, 20.48MiB each
2GiB total file size
Block size 16KiB
Number of IO requests: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Initializing worker threads...

Threads started!


File operations:
    reads/s:                      137.04
    writes/s:                     91.33
    fsyncs/s:                     237.99

Throughput:
    read, MiB/s:                  2.14
    written, MiB/s:               1.43

General statistics:
    total time:                          10.0825s
    total number of events:              4603

Latency (ms):
         min:                                    0.00
         avg:                                    2.17
         max:                                   23.14
         95th percentile:                        5.67
         sum:                                 9988.99

Threads fairness:
    events (avg/stddev):           4603.0000/0.00
    execution time (avg/stddev):   9.9890/0.00

下面是我在本地机械硬盘上的虚拟机测试的测试结果, 虚拟机软件 VMware WorkStation

 ⚡ root@dev2  ~   master  sysbench fileio --file-test-mode=rndrw  run
sysbench 1.0.17 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options:
Number of threads: 1
Initializing random number generator from current time


Extra file open flags: (none)
128 files, 16MiB each
2GiB total file size
Block size 16KiB
Number of IO requests: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Initializing worker threads...

Threads started!


File operations:
    reads/s:                      5081.59
    writes/s:                     3387.73
    fsyncs/s:                     10846.47

Throughput:
    read, MiB/s:                  79.40
    written, MiB/s:               52.93

General statistics:
    total time:                          10.0160s
    total number of events:              193399

Latency (ms):
         min:                                    0.00
         avg:                                    0.05
         max:                                    5.00
         95th percentile:                        0.16
         sum:                                 9856.46

Threads fairness:
    events (avg/stddev):           193399.0000/0.00
    execution time (avg/stddev):   9.8565/0.00

7636 次点击
所在节点    程序员
62 条回复
zhybb2010
2019-09-29 13:52:49 +08:00
[root@VM_0_16_centos test]# sysbench fileio --file-total-size=2G --file-num=100 --file-test-mode=rndrw run
sysbench 1.0.17 (using system LuaJIT 2.0.4)

Running the test with following options:
Number of threads: 1
Initializing random number generator from current time


Extra file open flags: (none)
100 files, 20.48MiB each
2GiB total file size
Block size 16KiB
Number of IO requests: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Initializing worker threads...

Threads started!


File operations:
reads/s: 327.70
writes/s: 218.47
fsyncs/s: 550.14

Throughput:
read, MiB/s: 5.12
written, MiB/s: 3.41

General statistics:
total time: 10.0682s
total number of events: 10940

Latency (ms):
min: 0.01
avg: 0.91
max: 24.51
95th percentile: 2.30
sum: 9966.85

Threads fairness:
events (avg/stddev): 10940.0000/0.00
execution time (avg/stddev): 9.9668/0.00


前天买的 99/year.
U2Fsd
2019-09-29 13:53:58 +08:00
是真的差。。所以还得另外买个 RDS 数据库
lihongjie0209
2019-09-29 13:54:07 +08:00
@zhybb2010 #1 感谢反馈, 这个 IO 不是一般的差啊
lihongjie0209
2019-09-29 13:54:49 +08:00
@U2Fsd #2 嗯, 也就只能跑应用服务器了
ahmcsxcc
2019-09-29 13:55:19 +08:00
我的腾讯云连 ssh 得等一两分钟才能连上
lihongjie0209
2019-09-29 13:57:36 +08:00
@ahmcsxcc #5 开 ssh 日志看看
tinybaby365
2019-09-29 13:59:31 +08:00
只是给你打日志用的,希望你是无状态的服务,其他都买买买
zhybb2010
2019-09-29 14:06:11 +08:00
跑跑爬虫脚本,上传到 oss 还行的
ahmcsxcc
2019-09-29 14:19:37 +08:00
File operations:
reads/s: 118.65
writes/s: 79.10
fsyncs/s: 206.56

Throughput:
read, MiB/s: 1.85
written, MiB/s: 1.24

General statistics:
total time: 10.1114s
total number of events: 3989

Latency (ms):
min: 0.00
avg: 2.50
max: 101.73
95th percentile: 6.43
sum: 9984.63

Threads fairness:
events (avg/stddev): 3989.0000/0.00
execution time (avg/stddev): 9.9846/0.00
lihongjie0209
2019-09-29 14:20:31 +08:00
@ahmcsxcc #9 你这个更惨
eason1874
2019-09-29 14:20:37 +08:00
你们对低配特价主机这么高预期的吗?

在我眼里,这些一百几十块的特价主机能稳定跑一些轻量应用就够了,从不指望在性能方面能有好的表现。
lihongjie0209
2019-09-29 14:22:11 +08:00
@eason1874 #11 我基本的预期是比普通机械硬盘慢 30%左右, 毕竟是虚拟机。 现在感觉我想多了
dalibaxiaoliba
2019-09-29 14:25:35 +08:00
@ahmcsxcc 这个也太黑了吧
mikeguan
2019-09-29 14:30:30 +08:00
@lihongjie0209 #12 按照磁盘大小限速,10g 磁盘和 100g 磁盘 IO 是不一样的,磁盘大小到达一定值就不限速了这就达到磁盘本身的限制。
lihongjie0209
2019-09-29 14:31:15 +08:00
@mikeguan #14 长知识的,谢谢
infra
2019-09-29 14:36:51 +08:00
提工单把限速打开就可以了吧
liuhuansir
2019-09-29 14:41:34 +08:00
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time


Extra file open flags: (none)
100 files, 20.48MiB each
2GiB total file size
Block size 16KiB
Number of IO requests: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Initializing worker threads...

Threads started!


File operations:
reads/s: 768.69
writes/s: 512.40
fsyncs/s: 1285.47

Throughput:
read, MiB/s: 12.00
written, MiB/s: 8.00

General statistics:
total time: 10.0208s
total number of events: 25656

Latency (ms):
min: 0.00
avg: 0.39
max: 15.98
95th percentile: 0.83
sum: 9919.53

Threads fairness:
events (avg/stddev): 25656.0000/0.00
execution time (avg/stddev): 9.9195/0.00
我这个什么水平
lihongjie0209
2019-09-29 14:43:25 +08:00
@liuhuansir #17 超过了目前统计的 99.99%
heiheidewo
2019-09-29 14:54:07 +08:00
不懂为啥会被限速? https://www.v2ex.com/t/300804 这里也有一个帖子,阿里云的
opengps
2019-09-29 14:55:07 +08:00
所有云都这样,虚拟机硬盘 io 都严重损失,ssd 的才勉强跟物理机机械硬盘划等号

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/605359

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX