Procedure for testing mysql performance using sysbench
The following brings you about the operation steps of using sysbench to test mysql performance, if you are interested, let's take a look at this article, I believe that after reading the operation steps of using sysbench to test mysql performance, it will be of some help to you.
Sysbench tests mysql performance:
Install sysbench 1.0:
Apt-get install bzr automake libtool libmysqlclient-dev pkg-config unzipln-s / usr/lib/x86_64-linux-gnu/libmysqlclient.so.20.3.14 / usr/lib/libmysqlclient_r.sowget https://github.com/akopytov/sysbench/archive/1.0.zip-O "sysbench-1.0.zip" unzip sysbench-1.0.zipcd sysbench-1.0./autogen.sh./configuremake & & make install
The oltp.lua path of 1.0 is-- test=./sysbench-1.0/tests/include/oltp_legacy/oltp.lua.
File I performance O performance (file I am O performance)
Scheduler performance (scheduling performance)
Memory allocation and transfer speed (memory allocation and transfer speed)
POSIX threads implementation performance (POSIX thread execution performance)
Database server performance (OLTP benchmark) (database server performance)
Test CPU:
/ usr/local/bin/sysbench-test=cpu-cpu-max-prime=2000-mysql-host=10.0.1.5-mysql-db=ming-mysql-user=ming-mysql-password=xxxxx run
Test thread:
/ usr/local/bin/sysbench-test=threads-threads=500-mysql-host=10.0.1.5-mysql-db=ming-mysql-user=ming-mysql-password=xxxxx run
Test IO:
Prepare:
/ usr/local/bin/sysbench-test=fileio-file-total-size=2G-file-test-mode=rndrw-mysql-host=10.0.1.5-mysql-db=ming-mysql-user=ming-mysql-password=xxxxx prepare
Test:
/ usr/local/bin/sysbench-test=fileio-file-total-size=2G-file-test-mode=rndrw-mysql-host=10.0.1.5-mysql-db=ming-mysql-user=ming-mysql-password=xxxxx run
Clean up:
/ usr/local/bin/sysbench-test=fileio-file-total-size=2G-file-test-mode=rndrw-mysql-host=10.0.1.5-mysql-db=ming-mysql-user=ming-mysql-password=xxxxx cleanup
Test memory:
/ usr/local/bin/sysbench-test=memory-memory-block-size=8k-memory-total-size=1G-mysql-host=10.0.1.5-mysql-db=ming-mysql-user=ming-mysql-password=xxxxx run
Test mutex (Mutual exclusion performance Test):
/ usr/local/bin/sysbench-test=mutex-num-threads=100-mutex-num=100-mutex-locks=100000-mutex-loops=10000-mysql-host=10.0.1.5-mysql-db=ming-mysql-user=ming-mysql-password=xxxxx run
Test OLTP (database server performance):
Prepare:
/ usr/local/bin/sysbench-test=./sysbench-1.0/tests/include/oltp_legacy/oltp.lua-mysql-table-engine=innodb-mysql-host=10.0.1.5-mysql-db=ming-oltp-table-size=500000-oltp-test-mode=complex-oltp-table-size=10-threads=10 mysql-user=ming-mysql-password=xxxxx prepare
Read-only test:
/ usr/local/bin/sysbench-test=./sysbench-1.0/tests/include/oltp_legacy/oltp_simple.lua-mysql-table-engine=innodb-mysql-host=10.0.1.5-mysql-db=ming-oltp-table-size=500000-oltp-test-mode=simple-oltp-table-size=10-threads=10 mysql-user=ming-mysql-password=xxxx run
Read-write mixed test:
/ usr/local/bin/sysbench-test=./sysbench-1.0/tests/include/oltp_legacy/oltp.lua-mysql-table-engine=innodb-mysql-host=10.0.1.5-mysql-db=ming-oltp-table-size=500000-oltp-test-mode=complex-oltp-table-size=10-threads=10 mysql-user=ming-mysql-password=xxxx run
Clean up:
/ usr/local/bin/sysbench-test=./sysbench-1.0/tests/include/oltp_legacy/oltp.lua-mysql-table-engine=innodb-mysql-host=10.0.1.5-mysql-db=ming-oltp-table-size=500000-oltp-test-mode=complex-oltp-table-size=10-threads=10 mysql-user=ming-mysql-password=xxxx cleanup
Read the details of the above procedures for using sysbench to test mysql performance and see if you have gained anything. If you want to know more about it, you can continue to follow our industry information section.