Benchmark--->sysbench

sysbench

Introduction to sysbench
  • sysbench is a cross-platform benchmark tool that supports multiple threads and multiple databases; it mainly includes the following tests:
    • CPU performance
    • Disk io performance
    • Scheduler performance
    • Memory allocation and transfer speed
    • POSIX thread performance
    • Database performance (OLTP benchmark)

      sysbench installation
//下载
wget https://github.com/akopytov/sysbench/archive/1.0.zip -O "sysbench-1.0.zip"

unzip sysbench-1.0.zip
cd sysbench-1.0
//安装依赖
yum install automake libtool –y
./autogen.sh
./configure
// #这里换成机器中mysql路径下的include,如果找不到用find命令找mysql.h,
export LD_LIBRARY_PATH=/usr/local/mysql/include
make
make install
sysbench --version
sysbench use
  • sysbench [options]... [testname] [command]
    • Command is the command to be executed by sysbench, including prepare, run, and cleanup. As the name suggests, prepare prepares data in advance for testing, run executes formal tests, and cleanup cleans the database after the test is completed.
    • testname specifies the test to be performed. In the old version of sysbench, the test script can be specified by the --test parameter; in the new version, the --test parameter has been declared to be obsolete, and --test can be used instead of Specify the script directly.
    • options parameter of sysbench
  • For database testing, prepare the mysql connection user in advance and assign the corresponding permissions

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325218261&siteId=291194637