Test tools

Updated at:

This topic describes how to install the SysBench test tool on an ECS instance.

Introduction to SysBench

SysBench is a modular, cross-platform, and multi-threaded benchmark tool that is used to evaluate the core operating parameters of a system running a heavily loaded database. It lets you obtain the performance of your database system without the need to configure complex database benchmark parameters or install database software.

Procedure

This stress test uses SysBench version 1.0.20. For more information, see SysBench.

  1. Run the following commands on the ECS instance to install SysBench.
    sudo yum install gcc gcc-c++ autoconf automake make libtool bzr mysql-devel git mysql
    git clone https://github.com/akopytov/sysbench.git
    ## Download SysBench from Git.
    cd sysbench
    ## Open the SysBench folder.
    git checkout 1.0.20
    ## Switch to SysBench version 1.0.20.
    ./autogen.sh
    ## Run autogen.sh.
    ./configure --prefix=/usr --mandir=/usr/share/man
    make
    ## Compile.
    make install
  2. Run the following commands to configure the SysBench client. Then the kernel can use all available CPUs to process data packets with the minimum context switches between CPUs. Two CPUs are used by default.
    sudo sh -c 'for x in /sys/class/net/eth0/queues/rx-*; do echo ffffffff>$x/rps_cpus; done'
    sudo sh -c "echo 32768 > /proc/sys/net/core/rps_sock_flow_entries"
    sudo sh -c "echo 4096 > /sys/class/net/eth0/queues/rx-0/rps_flow_cnt"
    sudo sh -c "echo 4096 > /sys/class/net/eth0/queues/rx-1/rps_flow_cnt"
    Note ffffffff specifies to use 32 CPUs. Each letter f represents four CPUs. You can change the value of this parameter as needed. For example, if your ECS instance uses eight CPUs, enter ff.