All Products
Search
Document Center

ApsaraDB RDS:Test procedure

Last Updated:Nov 15, 2023

This topic describes how to test the performance of an ApsaraDB RDS for PostgreSQL instance.

Note The stress testing duration is 180 seconds.
  1. Use Sysbench to load the data that is used for the test.
    sysbench ./tests/include/oltp_legacy/oltp.lua \
     --db-driver=pgsql \
     --pgsql-db=sbtest \
     --pgsql-user=<username> \
     --pgsql-password=<password> \
     --pgsql-port=5432 \
     --pgsql-host=<host> \
     --oltp-tables-count=64 \
     --oltp-table-size=10000000 \
     --time=180 \
     --max-requests=0 \
     --threads=20 \
     --report-interval=5 \
     --forced-shutdown=1 \
     prepare
  2. Run the following test script to perform a stress test.
    sysbench ./tests/include/oltp_legacy/oltp.lua \
     --db-driver=pgsql \
     --pgsql-db=sbtest \
     --pgsql-user=<username> \
     --pgsql-password=<password> \
     --pgsql-port=5432 \
     --pgsql-host=<host> \
     --oltp-tables-count=64 \
     --oltp-table-size=10000000 \
     --time=180 \ 
     --max-requests=0 \
     --threads=64 \
     --report-interval=5 \
     --forced-shutdown=1 \
     run
  3. Delete the data that is used for the test.
    sysbench ./tests/include/oltp_legacy/oltp.lua \
     --db-driver=pgsql \
     --pgsql-db=sbtest \
     --pgsql-user=<username> \
     --pgsql-password=<password> \
     --pgsql-port=5432 \
     --pgsql-host=<host> \
     --oltp-tables-count=64 \
     --oltp-table-size=10000000 \
     --time=180 \
     --max-requests=0 \
     --threads=200 \
     --report-interval=5 \
     --forced-shutdown=1 \
     cleanup