腾讯云主机的 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

7671 次点击
所在节点    程序员
62 条回复
liuhuansir
2019-09-29 14:59:18 +08:00
@lihongjie0209 难道跟活动的价格有关么?我的是 700 多买了三年,不像现在这么便宜
liuxu
2019-09-29 15:03:22 +08:00
真惨。。
[root@VM_0_9_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: 776.46
writes/s: 517.64
fsyncs/s: 1300.47

Throughput:
read, MiB/s: 12.13
written, MiB/s: 8.09

General statistics:
total time: 10.0436s
total number of events: 25964

Latency (ms):
min: 0.00
avg: 0.38
max: 28.53
95th percentile: 1.67
sum: 9949.76

Threads fairness:
events (avg/stddev): 25964.0000/0.00
execution time (avg/stddev): 9.9498/0.00
liuxu
2019-09-29 15:04:38 +08:00
@liuhuansir 看来你我是邻居了
CallMeReznov
2019-09-29 15:07:21 +08:00
File operations:
reads/s: 730.94
writes/s: 487.29
fsyncs/s: 1223.22

Throughput:
read, MiB/s: 11.42
written, MiB/s: 7.61

General statistics:
total time: 10.0127s
total number of events: 24350

Latency (ms):
min: 0.01
avg: 0.41
max: 99.49
95th percentile: 1.14
sum: 9959.39

Threads fairness:
events (avg/stddev): 24350.0000/0.00
execution time (avg/stddev): 9.9594/0.00


祖传 BUG 价阿里新加坡的测试数据


其实阿里云也一样,14 还是 15 年我刚接触云这块,公司的数据库服务器就直接扔云上的,8G 4C.
结果突然某一天夜里业务爆卡,查询仅有的一些日志也看不出个所以然.
进数据库看是某些线程锁死了,就直接给 KILL 了,可半个小时又炸了.
折腾了两天,最后在别人提点下查了一下 DISK TIME, 一路狂飙.........
直接买了台新主机把数据库迁移过去就解决了.... 找阿里云问,人家也回答不出个所以然.
但好巧不巧,没几天人阿里云就出了 SSD 云盘了....
fredcc
2019-09-29 15:08:00 +08:00
非活动 2 核 4G 机器

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: 748.40
writes/s: 498.93
fsyncs/s: 1256.11

Throughput:
read, MiB/s: 11.69
written, MiB/s: 7.79

General statistics:
total time: 10.0198s
total number of events: 24988

Latency (ms):
min: 0.00
avg: 0.40
max: 31.54
95th percentile: 1.42
sum: 9982.82

Threads fairness:
events (avg/stddev): 24988.0000/0.00
execution time (avg/stddev): 9.9828/0.00
ColoThor
2019-09-29 15:09:22 +08:00
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: 1777.52
writes/s: 1184.95
fsyncs/s: 2966.86

Throughput:
read, MiB/s: 27.77
written, MiB/s: 18.51

General statistics:
total time: 10.0087s
total number of events: 59256

Latency (ms):
min: 0.00
avg: 0.17
max: 37.48
95th percentile: 0.69
sum: 9968.93

Threads fairness:
events (avg/stddev): 59256.0000/0.00
execution time (avg/stddev): 9.9689/0.00
阿里云 4 核 8G5M,腾讯云学生机就惨不忍睹了
lihongjie0209
2019-09-29 15:13:12 +08:00
@ColoThor
@fredcc
付费用户就是快
pota
2019-09-29 15:19:39 +08:00
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: 287.95
writes/s: 191.97
fsyncs/s: 486.88

Throughput:
read, MiB/s: 4.50
written, MiB/s: 3.00

General statistics:
total time: 10.0618s
total number of events: 9630

Latency (ms):
min: 0.00
avg: 1.03
max: 22.61
95th percentile: 2.81
sum: 9962.83

Threads fairness:
events (avg/stddev): 9630.0000/0.00
execution time (avg/stddev): 9.9628/0.00

很久之前买的学生主机。。。
airyland
2019-09-29 15:24:51 +08:00
我有这么一台机子,经常因为搜狗(不带 ua 的非标准爬虫)的爬虫突然蜂拥过来导致 io 飙升然后无响应宕机。
silencefent
2019-09-29 15:25:23 +08:00
你机械硬盘比我 sata3 口上的 intel S3500 快 40%?
File operations:
reads/s: 3497.78
writes/s: 2331.85
fsyncs/s: 5833.52

Throughput:
read, MiB/s: 54.63
written, MiB/s: 36.42

General statistics:
total time: 10.0135s
total number of events: 116739

Latency (ms):
min: 0.00
avg: 0.08
max: 0.89
95th percentile: 0.24
sum: 9882.63

Threads fairness:
events (avg/stddev): 116739.0000/0.00
execution time (avg/stddev): 9.8826/0.00
oldw4ng
2019-09-29 15:27:42 +08:00
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: 760.76
writes/s: 507.17
fsyncs/s: 1268.33

Throughput:
read, MiB/s: 11.88
written, MiB/s: 7.92

General statistics:
total time: 10.0931s
total number of events: 25504

Latency (ms):
min: 0.00
avg: 0.39
max: 34.87
95th percentile: 1.61
sum: 9961.66

Threads fairness:
events (avg/stddev): 25504.0000/0.00
execution time (avg/stddev): 9.9617/0.00
niubee1
2019-09-29 15:27:46 +08:00
云主机 IO 都差, 这是常识
lihongjie0209
2019-09-29 15:28:39 +08:00
@silencefent #30 我的系统是 windows10 lts,VMware WorkStation 最新版本, 我记得 vmtools 也安装了
westoy
2019-09-29 15:30:38 +08:00
云主机共享型实例 IO 和 CPU 都是超卖重灾区, 哪有好的, 有也是邻居善(闲)良(置), 以前 AWS 上 IO 优化方案就是做 raid0........
gamexg
2019-09-29 15:32:20 +08:00
碰到过,发工单可解
userdhf
2019-09-29 15:38:16 +08:00
这是架设在 u 盘上的云主机么。。
silencefent
2019-09-29 15:39:17 +08:00
@lihongjie0209 跟系统关系不大,我是 linux centos7 的实体服务器
lihongjie0209
2019-09-29 16:06:32 +08:00
@silencefent #37 这就奇怪了
phpitboy
2019-09-29 16:19:36 +08:00
1C1G 的机器只适合跑一些轻量的服务或应用,如博客、日志等,这么便宜的机器不要太多预期~~ahh
xh520630
2019-09-29 16:23:24 +08:00
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: 786.51
writes/s: 524.34
fsyncs/s: 1316.34

Throughput:
read, MiB/s: 12.28
written, MiB/s: 8.19

General statistics:
total time: 10.0251s
total number of events: 26245

Latency (ms):
min: 0.00
avg: 0.38
max: 43.87
95th percentile: 1.30
sum: 9957.99

Threads fairness:
events (avg/stddev): 26245.0000/0.00
execution time (avg/stddev): 9.9580/0.00

看⑧懂

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

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

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

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

© 2021 V2EX