tencent cloud

Feedback

Test Methods

Last updated: 2024-08-09 15:23:48

    Test Tool

    Sysbench is an open-source, modular, cross-platform multi-threaded benchmark test tool tailored for online transaction processing (OLTP) scenarios. Sysbench can evaluate and test the performance of database core parameters under high load conditions.
    In a standard OLTP read-write scenario of SysBench, a transaction contains 18 read-write SQL statements.
    In a standard OLTP read-only scenario of SysBench, a transaction contains 14 read SQL statements (10 primary key point queries, 4 range queries).
    In a standard OLTP write-only scenario of SysBench, a transaction contains 4 write SQL statements (2 UPDATE statements, 1 DELETE statement, 1 INSERT statement).
    SysBench version 1.1.0 is used for this stress test. For more information, see the official document for Sysbench.

    Test Environment

    This document describes the environment used for the performance test of TencentDB for PostgreSQL.
    Region/AZ: Beijing - Beijing Zone 7
    Client: CVM Standard S6 (16 cores, 32GB, SSD cloud disk) 5Mbps
    Client OS: 64-bit TencentOS Server 2.6 (Final)
    Network: Both the CVM and TencentDB for PostgreSQL instances use the Virtual Private Cloud (VPC) and are in the same subnet
    The information on the TencentDB for PostgreSQL instances tested is as follows:
    Storage type: General - local high-performance SSD disk
    Instance architecture: Dual-machine high availability (one primary and one secondary) - read-write instance
    Instance version: V14.2
    Primary-replica replication mode: Asynchronous replication

    Test Metrics

    This document describes test metrics for the performance test of TencentDB for PostgreSQL.
    Metrics
    Definition
    TPS (Transactions Per Second)
    The number of transactions executed per second by the database, based on the number of successful COMMITs.
    QPS (Queries Per Second)
    The number of SQL statements executed per second by the database, including INSERT, SELECT, UPDATE, DELETE, and COMMIT.
    Concurrency
    The number of concurrent requests initiated by the client during performance test.

    Description of SysBench Parameters

    pgsql-host: The private network address of the TencentDB for PostgreSQL instance
    pgsql-port: The port number of the TencentDB for PostgreSQL instance
    pgsql-user: The username of the TencentDB for PostgreSQL instance
    pgsql-password: The password of the above username
    pgsql-db: The database name
    table-size: The data size of a single table
    tables: The total number of tables
    threads: The number of concurrent threads
    time: Running time

    Test Method

    Note:
    Replace XXX in the following command with the private network address, port number, username, user password, database name of the TencentDB for PostgreSQL test instance, as well as the single-table data size and total number of tables for the corresponding test scenario. For a detailed description of parameters, refer to the Description of SysBench Parameters.
    The steps to test the oltp_write_only scenario using Sysbench are as follows. To test oltp_read_only and oltp_read_write, simply replace the corresponding Lua model scenario file:
    1. Prepare data
    sysbench /usr/local/share/sysbench/oltp_write_only.lua --db-driver=pgsql --pgsql-host=XXX --pgsql-port=XXX --pgsql-user=XXX --pgsql-password=XXX --pgsql-db=XXX --table-size=XXX --tables=XXX prepare
    2. Run the command to perform stress test
    sysbench /usr/local/shareping
    sysbench/oltp_write_only.lua --db-driver=pgsql --pgsql-host=XXX --pgsql-port=XXX --pgsql-user=XXX --pgsql-password=XXX --pgsql-db=XXX --table-size=XXX --tables=XXX --threads=XXX --time=XXX --report-interval=1 run
    3. Clear the data
    sysbench /usr/local/share/sysbench/oltp_write_only.lua --db-driver=pgsql --pgsql-host=XXX --pgsql-port=XXX --pgsql-user=XXX --pgsql-password=XXX --pgsql-db=XXX --table-size=XXX --tables=XXX cleanup
    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