V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
lihongjie0209
V2EX  ›  程序员

腾讯云主机的 IO 惨不忍睹

  •  
  •   lihongjie0209 · 2019-09-29 13:48:15 +08:00 · 7668 次点击
    这是一个创建于 1906 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

    测试流程

    • 安装 sysbench
    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
    
    
    62 条回复    2019-10-28 21:43:02 +08:00
    zhybb2010
        1
    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
        2
    U2Fsd  
       2019-09-29 13:53:58 +08:00
    是真的差。。所以还得另外买个 RDS 数据库
    lihongjie0209
        3
    lihongjie0209  
    OP
       2019-09-29 13:54:07 +08:00
    @zhybb2010 #1 感谢反馈, 这个 IO 不是一般的差啊
    lihongjie0209
        4
    lihongjie0209  
    OP
       2019-09-29 13:54:49 +08:00
    @U2Fsd #2 嗯, 也就只能跑应用服务器了
    ahmcsxcc
        5
    ahmcsxcc  
       2019-09-29 13:55:19 +08:00
    我的腾讯云连 ssh 得等一两分钟才能连上
    lihongjie0209
        6
    lihongjie0209  
    OP
       2019-09-29 13:57:36 +08:00
    @ahmcsxcc #5 开 ssh 日志看看
    tinybaby365
        7
    tinybaby365  
       2019-09-29 13:59:31 +08:00 via iPhone
    只是给你打日志用的,希望你是无状态的服务,其他都买买买
    zhybb2010
        8
    zhybb2010  
       2019-09-29 14:06:11 +08:00
    跑跑爬虫脚本,上传到 oss 还行的
    ahmcsxcc
        9
    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
        10
    lihongjie0209  
    OP
       2019-09-29 14:20:31 +08:00
    @ahmcsxcc #9 你这个更惨
    eason1874
        11
    eason1874  
       2019-09-29 14:20:37 +08:00
    你们对低配特价主机这么高预期的吗?

    在我眼里,这些一百几十块的特价主机能稳定跑一些轻量应用就够了,从不指望在性能方面能有好的表现。
    lihongjie0209
        12
    lihongjie0209  
    OP
       2019-09-29 14:22:11 +08:00
    @eason1874 #11 我基本的预期是比普通机械硬盘慢 30%左右, 毕竟是虚拟机。 现在感觉我想多了
    dalibaxiaoliba
        13
    dalibaxiaoliba  
       2019-09-29 14:25:35 +08:00 via Android
    @ahmcsxcc 这个也太黑了吧
    mikeguan
        14
    mikeguan  
       2019-09-29 14:30:30 +08:00 via Android
    @lihongjie0209 #12 按照磁盘大小限速,10g 磁盘和 100g 磁盘 IO 是不一样的,磁盘大小到达一定值就不限速了这就达到磁盘本身的限制。
    lihongjie0209
        15
    lihongjie0209  
    OP
       2019-09-29 14:31:15 +08:00
    @mikeguan #14 长知识的,谢谢
    infra
        16
    infra  
       2019-09-29 14:36:51 +08:00
    提工单把限速打开就可以了吧
    liuhuansir
        17
    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
        18
    lihongjie0209  
    OP
       2019-09-29 14:43:25 +08:00
    @liuhuansir #17 超过了目前统计的 99.99%
    heiheidewo
        19
    heiheidewo  
       2019-09-29 14:54:07 +08:00
    不懂为啥会被限速? https://www.v2ex.com/t/300804 这里也有一个帖子,阿里云的
    opengps
        20
    opengps  
       2019-09-29 14:55:07 +08:00
    所有云都这样,虚拟机硬盘 io 都严重损失,ssd 的才勉强跟物理机机械硬盘划等号
    liuhuansir
        21
    liuhuansir  
       2019-09-29 14:59:18 +08:00
    @lihongjie0209 难道跟活动的价格有关么?我的是 700 多买了三年,不像现在这么便宜
    liuxu
        22
    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
        23
    liuxu  
       2019-09-29 15:04:38 +08:00
    @liuhuansir 看来你我是邻居了
    CallMeReznov
        24
    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
        25
    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
        26
    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
        27
    lihongjie0209  
    OP
       2019-09-29 15:13:12 +08:00
    @ColoThor
    @fredcc
    付费用户就是快
    pota
        28
    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
        29
    airyland  
       2019-09-29 15:24:51 +08:00
    我有这么一台机子,经常因为搜狗(不带 ua 的非标准爬虫)的爬虫突然蜂拥过来导致 io 飙升然后无响应宕机。
    silencefent
        30
    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
        31
    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
        32
    niubee1  
       2019-09-29 15:27:46 +08:00
    云主机 IO 都差, 这是常识
    lihongjie0209
        33
    lihongjie0209  
    OP
       2019-09-29 15:28:39 +08:00
    @silencefent #30 我的系统是 windows10 lts,VMware WorkStation 最新版本, 我记得 vmtools 也安装了
    westoy
        34
    westoy  
       2019-09-29 15:30:38 +08:00
    云主机共享型实例 IO 和 CPU 都是超卖重灾区, 哪有好的, 有也是邻居善(闲)良(置), 以前 AWS 上 IO 优化方案就是做 raid0........
    gamexg
        35
    gamexg  
       2019-09-29 15:32:20 +08:00 via Android
    碰到过,发工单可解
    userdhf
        36
    userdhf  
       2019-09-29 15:38:16 +08:00
    这是架设在 u 盘上的云主机么。。
    silencefent
        37
    silencefent  
       2019-09-29 15:39:17 +08:00
    @lihongjie0209 跟系统关系不大,我是 linux centos7 的实体服务器
    lihongjie0209
        38
    lihongjie0209  
    OP
       2019-09-29 16:06:32 +08:00
    @silencefent #37 这就奇怪了
    phpitboy
        39
    phpitboy  
       2019-09-29 16:19:36 +08:00
    1C1G 的机器只适合跑一些轻量的服务或应用,如博客、日志等,这么便宜的机器不要太多预期~~ahh
    xh520630
        40
    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

    看⑧懂
    JimmyTinsley
        41
    JimmyTinsley  
       2019-09-29 16:24:04 +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: 1288.83
    writes/s: 859.15
    fsyncs/s: 2157.38

    Throughput:
    read, MiB/s: 20.13
    written, MiB/s: 13.42

    General statistics:
    total time: 10.0059s
    total number of events: 43006

    Latency (ms):
    min: 0.00
    avg: 0.23
    max: 14.06
    95th percentile: 0.44
    sum: 9956.45

    Threads fairness:
    events (avg/stddev): 43006.0000/0.00
    execution time (avg/stddev): 9.9565/0.00


    我是 vultr 的 1C1G, 不过似乎是 SSD, 跑分还行啊
    lands
        42
    lands  
       2019-09-29 18:11:32 +08:00
    百度 2C2G
    $ 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: 946.48
    writes/s: 630.99
    fsyncs/s: 1582.06

    Throughput:
    read, MiB/s: 14.78
    written, MiB/s: 9.86

    General statistics:
    total time: 10.0143s
    total number of events: 31546

    Latency (ms):
    min: 0.00
    avg: 0.32
    max: 38.72
    95th percentile: 0.99
    sum: 9955.21

    Threads fairness:
    events (avg/stddev): 31546.0000/0.00
    execution time (avg/stddev): 9.9552/0.00
    Chingim
        43
    Chingim  
       2019-09-29 18:25:40 +08:00
    太惨了, 连 usb2.0 的速度都没有?
    ilihai
        44
    ilihai  
       2019-09-29 19:15:50 +08:00
    用楼主的命令:

    FATAL: Too large position discovered in request!

    怎么破?
    xiofee
        45
    xiofee  
       2019-09-30 03:20:41 +08:00
    两年前买的 1U2G1Mbps 腾讯云活动机器
    -----------------------------
    [root@VM_0_11_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: 268.22
    writes/s: 178.88
    fsyncs/s: 456.63

    Throughput:
    read, MiB/s: 4.19
    written, MiB/s: 2.79

    General statistics:
    total time: 10.0717s
    total number of events: 9004

    Latency (ms):
    min: 0.01
    avg: 1.11
    max: 17.60
    95th percentile: 2.61
    sum: 9964.08

    Threads fairness:
    events (avg/stddev): 9004.0000/0.00
    execution time (avg/stddev): 9.9641/0.00
    ryd994
        46
    ryd994  
       2019-09-30 06:05:21 +08:00
    因为你给的钱不够
    云主机都是储存和计算节点分离,磁盘通过网络挂载。带宽够用,但是延迟问题无解。如果你对一致性没有太高要求的话可以加钱带本地 nvme 缓存,也就是所谓的 IO 优化实例。否则无解。
    lihongjie0209
        47
    lihongjie0209  
    OP
       2019-09-30 08:51:15 +08:00
    @ryd994 #46 IO 优化实例适不适合做数据库服务器, 如果不合适,有什么推荐的
    ryd994
        48
    ryd994  
       2019-09-30 09:29:08 +08:00   ❤️ 1
    @lihongjie0209 带本地 write back 缓存的肯定可以,因为性能基本等于物理机
    具体腾讯用的是什么我也不确定,你可以自己试试效果怎么样
    afirefish
        49
    afirefish  
       2019-09-30 09:30:00 +08:00
    腾讯的:
    Category Test Result
    HDParm Disk Read 12.67 MB/s
    HDParm Cached Disk Read 100.43 MB/s
    DD Disk Write 40.8 MB/s
    FIO 4k random read IOPS ( KB/s)
    FIO 4k random write IOPS ( KB/s)
    IOZone 4k read 5471 KB/s
    IOZone 4k write 1561 KB/s
    IOZone 4k random read 5860 KB/s
    IOZone 4k random write 1582 KB/s
    -----------------------------------------------------------------------
    华为的:
    Category Test Result
    HDParm Disk Read 156.06 MB/s
    HDParm Cached Disk Read 190.75 MB/s
    DD Disk Write 164 MB/s
    FIO 4k random read 5776 IOPS (23107 KB/s)
    FIO 4k random write 7243 IOPS (28975 KB/s)
    IOZone 4k read 12447 KB/s
    IOZone 4k write 6167 KB/s
    IOZone 4k random read 10055 KB/s
    IOZone 4k random write 5075 KB/s
    -----------------------------------------------------------------------

    腾讯的 1H2G 的学生机,华为的是 200 一年的学生机。相比之下腾讯机器真的是惨不忍睹。
    GoRoad
        50
    GoRoad  
       2019-09-30 10:12:17 +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: 273.34
    writes/s: 182.26
    fsyncs/s: 463.30

    Throughput:
    read, MiB/s: 4.27
    written, MiB/s: 2.85

    General statistics:
    total time: 10.1213s
    total number of events: 9222

    Latency (ms):
    min: 0.00
    avg: 1.08
    max: 29.76
    95th percentile: 2.43
    sum: 9980.24

    Threads fairness:
    events (avg/stddev): 9222.0000/0.00
    execution time (avg/stddev): 9.9802/0.00
    GoRoad
        51
    GoRoad  
       2019-09-30 10:17:36 +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: 556.84
    writes/s: 371.23
    fsyncs/s: 932.26

    Throughput:
    read, MiB/s: 8.70
    written, MiB/s: 5.80

    General statistics:
    total time: 10.0187s
    total number of events: 18542

    Latency (ms):
    min: 0.01
    avg: 0.54
    max: 72.08
    95th percentile: 1.61
    sum: 9981.45

    Threads fairness:
    events (avg/stddev): 18542.0000/0.00
    execution time (avg/stddev): 9.9815/0.00
    he583899772
        52
    he583899772  
       2019-09-30 10:32:03 +08:00
    昨天也买了,真的是差的不行,骗钱的
    joejhy
        53
    joejhy  
       2019-09-30 11:26:09 +08:00 via iPhone   ❤️ 1
    IO 测试有很多种维度衡量,块大小 /队列深度 /并发等等都会影响测试结果。
    而且不同测试的参数反应出来的结论是不一样的。

    像楼主这种测试方式 ysbench fileio --file-total-size=2G --file-num=100 --file-test-mode=rndrw run,明显就是默认的小块+队列深度 1,吞吐带宽低是正常,这种参数反应出来的是 IO 延时;
    如果想要测吞吐带宽,那就要大块 128K+队列深度 32 这种的来测吞吐。
    lihongjie0209
        54
    lihongjie0209  
    OP
       2019-09-30 12:13:42 +08:00
    @joejhy #53 这个只是一个比较宽泛的测试, 并不是想测试硬盘的某一个指标的具体性能。 我给出了在本地虚拟机的相同测试进行对比, 可以得出一个相对的测试结果。
    azh7138m
        55
    azh7138m  
       2019-09-30 13:18:36 +08:00
    @CallMeReznov 年付 12 刀的阿里云不是不能续费吗?
    CFM880
        56
    CFM880  
       2019-09-30 13:53:31 +08:00
    阿里云的
    ```
    root@iZj6ca349oujk89sabu89tZ:~# sysbench fileio --file-total-size=2G --file-num=100 --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)
    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: 871.18
    writes/s: 580.72
    fsyncs/s: 1457.29

    Throughput:
    read, MiB/s: 13.61
    written, MiB/s: 9.07

    General statistics:
    total time: 10.0166s
    total number of events: 29046

    Latency (ms):
    min: 0.00
    avg: 0.34
    max: 85.67
    95th percentile: 0.92
    sum: 9957.00

    Threads fairness:
    events (avg/stddev): 29046.0000/0.00
    execution time (avg/stddev): 9.9570/0.00

    root@iZj6ca349oujk89sabu89tZ:~#
    ```
    CallMeReznov
        57
    CallMeReznov  
       2019-09-30 14:00:43 +08:00
    @azh7138m #55 后来一个一个月 30-40 包 1T 流量包的版本 没限速之前是 200M 带宽 现在应该是限速了,但是也比一般的强百倍.
    EdwardLeeJan
        58
    EdwardLeeJan  
       2019-09-30 14:30:11 +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: 223.03
    writes/s: 148.75
    fsyncs/s: 377.84

    Throughput:
    read, MiB/s: 3.48
    written, MiB/s: 2.32

    General statistics:
    total time: 10.0553s
    total number of events: 7439

    Latency (ms):
    min: 0.00
    avg: 1.34
    max: 53.62
    95th percentile: 3.36
    sum: 9975.82

    Threads fairness:
    events (avg/stddev): 7439.0000/0.00
    execution time (avg/stddev): 9.9758/0.00
    mink
        59
    mink  
       2019-09-30 15:28:47 +08:00
    做的是真的差, 我就跑了一个 mysql 实例, 内存就满了 这还是 1G 的机器啊,500 的怎么活。
    ragnaroks
        60
    ragnaroks  
       2019-09-30 16:20:52 +08:00
    [学生机]# sysbench fileio --file-total-size=1G --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, 10.24MiB each
    1024MiB 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: 253.30
    writes/s: 168.87
    fsyncs/s: 423.05

    Throughput:
    read, MiB/s: 3.96
    written, MiB/s: 2.63

    General statistics:
    total time: 10.1834s
    total number of events: 8509

    Latency (ms):
    min: 0.00
    avg: 1.17
    max: 15.14
    95th percentile: 3.55
    sum: 9951.22

    Threads fairness:
    events (avg/stddev): 8509.0000/0.00
    execution time (avg/stddev): 9.9512/0.00

    ---------------------------------------------------------------------------

    [特价机]# 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: 2071.55
    writes/s: 1381.04
    fsyncs/s: 3457.68

    Throughput:
    read, MiB/s: 32.36
    written, MiB/s: 21.57

    General statistics:
    total time: 10.0193s
    total number of events: 69151

    Latency (ms):
    min: 0.00
    avg: 0.14
    max: 30.04
    95th percentile: 0.77
    sum: 9948.41

    Threads fairness:
    events (avg/stddev): 69151.0000/0.00
    execution time (avg/stddev): 9.9484/0.00
    wangxiyu191
        61
    wangxiyu191  
       2019-10-01 02:17:30 +08:00
    还是钱的问题吧,去阿里云买块 PL3 的 ESSD 会惊喜的发现吞吐比单 PCIE 的 SSD 都大,延迟接近。当然价格也比普通的 SSD 云盘要贵。2333333
    phithon
        62
    phithon  
       2019-10-28 21:43:02 +08:00
    同腾讯云……

    237481+0 records in
    237481+0 records out
    121590272 bytes (122 MB, 116 MiB) copied, 7.84412 s, 15.5 MB/s

    dd if=/dev/zero of=test 0.10s user 0.44s system 6% cpu 7.846 total
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4172 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 05:30 · PVG 13:30 · LAX 21:30 · JFK 00:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.