Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Procedure for testing mysql performance using sysbench

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report