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 