tencent cloud

Feedback

Performance Comparison of Parameter Templates

Last updated: 2023-03-13 11:56:24

    Test Tool

    Sysbench 1.0.20 is the tool used to test the database benchmark performance.

    Tool installation

    Run the following code to install Sysbench 1.0.20:

    git clone https://github.com/akopytov/sysbench.git
    git checkout 1.0.20
    yum install gcc gcc-c++ autoconf automake make libtool bzr mysql-devel git mysql
    cd sysbench
    ./autogen.sh
    ./configure
    make -j
    make install
    
    Note:

    The installation directions above apply to performance stress testing on a CentOS CVM instance. For directions on installing the tool on other operating systems, see the official Sysbench documentation.

    Test Environment

    Type Description
    Test instance specification Three common specifications, namely, 4-core CPU and 8 GB memory, 8-core CPU and 32 GB memory, and 16-core CPU and 128 GB memory
    Client configuration 64-core CPU and 128 GB memory
    Client private network bandwidth 23 Gbps
    Test data volume Database instance memory * 1.2
    Test database instance versions 5.6 20210630, 5.7 20210630, and 8.0 20210330
    • Note on client specification: High-spec client machines are used so as to ensure that the database instance performance can be measured through stress testing on a single client. For low-spec clients, we recommend you use multiple clients for concurrent stress testing and aggregate the results.
    • Note on network latency: When performing the test, make sure that clients and database instances are in the same AZ to prevent the testing result from being affected by network factors.

    Test Method

    Test data preparations

    sysbench --db-driver=mysql --mysql-host=xxxx --mysql-port=xxxx --mysql-user=xxxx --mysql-password=xxxx --mysql-db=sbtest --table_size=xxxx --tables=xxxx --events=0 --time=600 --threads=xxxx --percentile=95 --report-interval=1 oltp_read_write prepare
    

    Command for performance stress testing

    sysbench --db-driver=mysql --mysql-host=xxxx --mysql-port=xxxx --mysql-user=xxxx --mysql-password=xxxx --mysql-db=sbtest --table_size=xxxx --tables=xxxx --events=0 --time=600 --threads=xxxx --percentile=95 --report-interval=1 oltp_read_write run
    

    Descriptions of stress testing parameters:

    • oltp_read_write indicates to implement the OLTP test by calling the /usr/share/sysbench/oltp_read_write.lua script.
    • --tables=xxxx indicates the number of tables in this test.
    • --table_size=xxxx indicates the number of table rows in this test.
    • --threads=xxxx indicates the number of concurrent connections of the client in this test.
    • --report-interval=1 indicates that the test result is output once every second.
    • --percentile=95 indicates the sampling rate, which is 95% by default.
    • --time=600 indicates the execution time of this test, which is 600 seconds.

    Scenario model

    The test cases in this document all use the Lua script of sysbench.
    For the common configurations, performance testing is conducted for different parameter templates. The test results are as follows:

    Test result

    v5.6 20210630

    CPU (Core)Memory (GB)ThreadsTest DurationTemplateSysBench QPSSysBench TPSavg_lat
    4 8 32 10 min Default template (disused)34428.691721.4318.59 ms
    High-performance parameter template35917.501795.8717.82 ms
    High-stability parameter template34834.041741.7018.37 ms
    8 32 64 10 min Default template (disused)61210.193060.5120.91 ms
    High-performance parameter template67719.553385.9818.90 ms
    High-stability parameter template64910.093245.5019.72 ms
    16 128 128 10 min Default template (disused)106965.445348.2723.93 ms
    High-performance parameter template127955.486397.7720.00 ms
    High-stability parameter template119509.025975.4521.41 ms

    v5.7 20210630

    CPU (Core)Memory (GB)ThreadsTest DurationTemplateSysBench QPSSysBench TPSavg_lat
    4 8 32 10 min Default template (disused)34428.691721.4318.59 ms
    High-performance parameter template35917.501795.8717.82 ms
    High-stability parameter template34834.041741.7018.37 ms
    8 32 64 10 min Default template (disused)61210.193060.5120.91 ms
    High-performance parameter template67719.553385.9818.90 ms
    High-stability parameter template64910.093245.5019.72 ms
    16 128 128 10 min Default template (disused)106965.445348.2723.93 ms
    High-performance parameter template127955.486397.7720.00 ms
    High-stability parameter template119509.025975.4521.41 ms

    v8.0 20210330

    CPU (Core)Memory (GB)ThreadsTest DurationTemplateSysBench QPSSysBench TPSavg_lat
    4 8 32 10 min Default template (disused)32594.791629.7419.63 ms
    High-performance parameter template33383.771669.1919.17 ms
    High-stability parameter template32071.901603.6019.95 ms
    8 32 64 10 min Default template (disused)65718.223285.9119.47 ms
    High-performance parameter template70195.373509.7718.23 ms
    High-stability parameter template60704.693035.2321.08 ms
    16 128 128 10 min Default template (disused)132023.666601.1819.38 ms
    High-performance parameter template151021.677551.0816.95 ms
    High-stability parameter template132391.016619.5519.33 ms
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support