All Products
Search
Document Center

:Test tool

Last Updated:Aug 24, 2023

This topic introduces the SysBench test tool that is used to test the performance of an ApsaraDB RDS for PostgreSQL instance. This topic also describes how to install the SysBench test tool on an Elastic Compute Service (ECS) instance.

Background information

SysBench is a modular, cross-platform, and multi-threaded benchmark tool. You can use it to evaluate the performance of core parameters of a system that runs a database of heavy loads. SysBench allows you to obtain the performance of your database system in an efficient manner.

Install SysBench

Download and install SysBench.
wget -c https://github.com/akopytov/sysbench/archive/1.0.12.zip
yum install make automake libtool pkgconfig libaio-devel postgresql-devel
unzip 1.0.12.zip
cd sysbench-1.0.12
# By default, Sysbench supports MySQL. In this example, configure Sysbench to support PostgreSQL. 
./autogen.sh
./configure --with-pgsql --without-mysql
make
make install
Parameter description
ParameterDescription
db-driverThe database engine.
pgsql-hostThe endpoint of the RDS instance.
pgsql-portThe port number that is used to connect to the RDS instance.
pgsql-userThe username of the account that is used to log on to the database.
pgsql-passwordThe password of the account that is used to log on to the database.
pgsql-dbThe name of the database that belongs to the RDS instance.
timeThe time required for the test.
threadsThe number of concurrent threads.
max-requestsThe maximum number of requests that are allowed for a Lua script. If you set this parameter to 0, no limits are imposed on the number of requests.
report-intervalThe interval at which a stress test report is generated. Unit: seconds.
force-shutdownSpecifies whether to forcefully terminate the test.