线程测试
以下是引用片段: NinGoo:/u01/sysbench/bin>$sysbench --test=threads --num-threads=64 --thread-yields=100 \ --thread-locks=2 run sysbench 0.4.12: multi-threaded system evaluation benchmark Running the test with following options: Number of threads: 64 Doing thread subsystem performance test Thread yields per test: 100 Locks used: 2 Threads started! Done. Test execution summary: total time: 4.3925s total number of events: 10000 total time taken by event execution: 280.4418 per-request statistics: min: 0.04ms avg: 28.04ms max: 72.81ms approx. 95 percentile: 52.29ms Threads fairness: events (avg/stddev): 156.2500/1.43 execution time (avg/stddev): 4.3819/0.01 |
文件IO性能测试
首先生成需要的测试文件,文件总大小300M,16个并发线程,随机读写模式。执行完后会在当前目录下生成一堆小文件。
以下是引用片段: NinGoo:/u01/sysbench/bin>$sysbench --test=fileio --num-threads=16 \ --file-total-size=300M --file-test-mode=rndrw prepare sysbench 0.4.12: multi-threaded system evaluation benchmark 128 files, 2400Kb each, 300Mb total Creating files for the test... |
执行测试
以下是引用片段: NinGoo:/u01/sysbench/bin>$sysbench --test=fileio --num-threads=16 \ --file-total-size=300M --file-test-mode=rndrw run sysbench 0.4.12: multi-threaded system evaluation benchmark Running the test with following options: Number of threads: 16 Extra file open flags: 0 128 files, 2.3438Mb each 300Mb total file size Block size 16Kb Number of random requests for random IO: 10000 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 Threads started! Done. Operations performed: 5996 Read, 4004 Write, 12800 Other = 22800 Total Read 93.688Mb Written 62.562Mb Total transferred 156.25Mb (26.713Mb/sec) 1709.66 Requests/sec executed Test execution summary: total time: 5.8491s total number of events: 10000 total time taken by event execution: 12.5045 per-request statistics: min: 0.01ms avg: 1.25ms max: 373.28ms approx. 95 percentile: 0.03ms Threads fairness: events (avg/stddev): 625.0000/109.60 execution time (avg/stddev): 0.7815/0.29 |
原文转自:http://blogread.cn/it/article/623?f=sa