安装:
-
./configure --with-mysql-libs=/home/mysql/product/5.7/mysql-1/lib --with-mysql-includes=/home/mysql/product/5.7/mysql-1/include
-
make
报错:
-
/usr/bin/ld: cannot find -lmysqlclient_r
好像是新版mysql,so的名字变了。做个链接。
-
cd /home/mysql/product/5.7/mysql-1/lib
-
ln -s libmysqlclient.so.20.2.0 libmysqlclient_r.so
再make,通过。
cpu性能测试:
-
# sysbench/sysbench --test=cpu --cpu-max-prime=20000 run
-
sysbench 0.4.12.6: multi-threaded system evaluation benchmark
-
-
Running the test with following options:
-
Number of threads: 1
-
Random number generator seed is 0 and will be ignored
-
-
-
Doing CPU performance benchmark
-
-
Threads started!
-
Done.
-
-
Maximum prime number checked in CPU test: 20000
-
-
-
Test execution summary:
-
total time: 32.7086s
-
total number of events: 10000
-
total time taken by event execution: 32.7073
-
per-request statistics:
-
min: 3.24ms
-
avg: 3.27ms
-
max: 7.83ms
-
approx. 95 percentile: 3.27ms
-
-
Threads fairness:
-
events (avg/stddev): 10000.0000/0.00
-
execution time (avg/stddev): 32.7073/0.00
线程测试:
-
# sysbench/sysbench --test=threads --num-threads=64 --thread-yields=100 --thread-locks=2 run
-
sysbench 0.4.12.6: multi-threaded system evaluation benchmark
-
-
Running the test with following options:
-
Number of threads: 64
-
Random number generator seed is 0 and will be ignored
-
-
-
Doing thread subsystem performance test
-
Thread yields per test: 100 Locks used: 2
-
Threads started!
-
Done.
-
-
-
Test execution summary:
-
total time: 1.8260s
-
total number of events: 10000
-
total time taken by event execution: 116.4268
-
per-request statistics:
-
min: 0.05ms
-
avg: 11.64ms
-
max: 73.29ms
-
approx. 95 percentile: 38.26ms
-
-
Threads fairness:
-
events (avg/stddev): 156.2500/9.32
-
execution time (avg/stddev): 1.8192/0.00
磁盘性能测试:
-
# sysbench/sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw prepare
-
sysbench 0.4.12.6: multi-threaded system evaluation benchmark
-
-
128 files, 24576Kb each, 3072Mb total
-
Creating files for the test...
-
-
# sysbench/sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw run
-
sysbench 0.4.12.6: multi-threaded system evaluation benchmark
-
-
Running the test with following options:
-
Number of threads: 16
-
Random number generator seed is 0 and will be ignored
-
-
-
Extra file open flags: 0
-
128 files, 24Mb each
-
3Gb 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: 6033 Read, 4015 Write, 12703 Other = 22751 Total
-
Read 94.266Mb Written 62.734Mb Total transferred 157Mb (272.08Mb/sec)
-
17413.36 Requests/sec executed
-
-
Test execution summary:
-
total time: 0.5770s
-
total number of events: 10048
-
total time taken by event execution: 4.6779
-
per-request statistics:
-
min: 0.01ms
-
avg: 0.47ms
-
max: 84.70ms
-
approx. 95 percentile: 0.68ms
-
-
Threads fairness:
-
events (avg/stddev): 628.0000/87.04
-
execution time (avg/stddev): 0.2924/0.03
-
-
# sysbench/sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw cleanup
-
sysbench 0.4.12.6: multi-threaded system evaluation benchmark
-
-
Removing test files...
内存测试:
-
# sysbench/sysbench --test=memory --memory-block-size=8K --memory-total-size=4G run
-
sysbench 0.4.12.6: multi-threaded system evaluation benchmark
-
-
Running the test with following options:
-
Number of threads: 1
-
Random number generator seed is 0 and will be ignored
-
-
-
Doing memory operations speed test
-
Memory block size: 8K
-
-
Memory transfer size: 4096M
-
-
Memory operations type: write
-
Memory scope type: global
-
Threads started!
-
Done.
-
-
Operations performed: 524288 (710223.59 ops/sec)
-
-
4096.00 MB transferred (5548.62 MB/sec)
-
-
-
Test execution summary:
-
total time: 0.7382s
-
total number of events: 524288
-
total time taken by event execution: 0.6791
-
per-request statistics:
-
min: 0.00ms
-
avg: 0.00ms
-
max: 0.73ms
-
approx. 95 percentile: 0.00ms
-
-
Threads fairness:
-
events (avg/stddev): 524288.0000/0.00
-
execution time (avg/stddev): 0.6791/0.00
-
OLTP测试:
-
# sysbench/sysbench --test=oltp --mysql-table-engine=innodb --mysql-host=10.128.31.29 --mysql-user=xxx --mysql-password=xxx --mysql-db=xxx prepare
-
sysbench 0.4.12.6: multi-threaded system evaluation benchmark
-
-
No DB drivers specified, using mysql
-
Creating table 'sbtest'...
-
Creating 10000 records in table 'sbtest'...
-
-
# sysbench/sysbench --test=oltp --mysql-table-engine=innodb --mysql-host=10.128.31.29 --mysql-user=xxx --mysql-password=xxx --mysql-db=xxx run
-
sysbench 0.4.12.6: multi-threaded system evaluation benchmark
-
-
No DB drivers specified, using mysql
-
Running the test with following options:
-
Number of threads: 1
-
Random number generator seed is 0 and will be ignored
-
-
-
Doing OLTP test.
-
Running mixed OLTP test
-
Using Special distribution (12 iterations, 1 pct of values are returned in 75 pct cases)
-
Using "BEGIN" for starting transactions
-
Using auto_inc on the id column
-
Maximum number of requests for OLTP test is limited to 10000
-
Using 1 test tables
-
Threads started!
-
Done.
-
-
OLTP test statistics:
-
queries performed:
-
read: 140000
-
write: 50000
-
other: 20000
-
total: 210000
-
transactions: 10000 (91.40 per sec.)
-
deadlocks: 0 (0.00 per sec.)
-
read/write requests: 190000 (1736.69 per sec.)
-
other operations: 20000 (182.81 per sec.)
-
-
Test execution summary:
-
total time: 109.4035s
-
total number of events: 10000
-
total time taken by event execution: 109.2957
-
per-request statistics:
-
min: 5.01ms
-
avg: 10.93ms
-
max: 36.29ms
-
approx. 95 percentile: 11.91ms
-
-
Threads fairness:
-
events (avg/stddev): 10000.0000/0.00
-
execution time (avg/stddev): 109.2957/0.00
-
-
-
# sysbench/sysbench --test=oltp --mysql-table-engine=innodb --mysql-host=10.128.31.29 --mysql-user=xxx --mysql-password=xxx --mysql-db=xxx cleanup
-
sysbench 0.4.12.6: multi-threaded system evaluation benchmark
-
-
No DB drivers specified, using mysql
-
Dropping table 'sbtest'...
-
Done.
阅读(1829) | 评论(0) | 转发(0) |