With the surge in the number of Database-as-a-Service providers in the market today, many DBaaS providers claim to offer competitive database performance for your applications. The only true way of evaluating the performance of the database is by running performance benchmarks for the databases running on the cloud. In this article, we run performance benchmarks to evaluate, analyze, and compare the performance of PostgreSQL database engines running on the AWS cloud for Tessell. We have used the PGIO benchmarking tool for the benchmarking process.
Before starting the benchmarking process, you need to get your environment ready.
Prepare your environment
To prepare the environment for the benchmarking process, perform the following high-level tasks:
- Provision a Tessell for PostgreSQL instance to benchmark the performance testing. We are using the Tessell shape “tesl_8h_a” on the AWS cloud. This shape comes with 8 vCPUs and 64 GB RAM. While provisioning the instance, note down the username and password to connect to your database instance.
- Launch or create an Amazon EC2 instance to install the PGIO benchmarking tool, and set up the load. It is recommended that you create the instance in the same Virtual Private Cloud (VPC) as your Tessell RDS instance to keep the latency minimum.
- Set up the security groups for the client and server machines in a way that the client machine can connect to the server machine over the database port TCP:5432. For more information, see Default security groups for your VPC.
The following diagram shows the recommended environment for running the benchmarking process. The VPC located in the AWS cloud contains the Tessell for PostgreSQL instance and the PGIO client installed in the Amazon EC2 instance.
Provision the PGIO client machine
Download PGIO and configure PostgreSQL
Secondly, download the PGIO benchmarking tool on the provisioned instance and configure PostgreSQL. To do so, perform the following steps:
1. Configure the yum repository by running the following command:
2. Install the PostgreSQL binaries:
3. Download the PGIO source code by using git.
- Install the git tool and clone the PGIO project to your instance.
- Extract the PGIO source code files.
4. Configure the PostgreSQL connection parameters by setting the following environment variables.
For example, enter the following values:
5. Test the psql connection by running the following command:
Run the benchmark
Before you run the benchmark, configure the PGIO configuration file and start the Setup (load schemas), and
- Open the /home/ec2-user/pgio/pgio.conf file and replace the default parameter values with the following values:
For more information about the PGIO configuration parameter, see the README.
- Start setting up PGIO and load schemas by running the following command:
This loads approximately 320 GB of slob database.
- Run the performance test with the following command:
Results
When the performance test completes, the IOPS achieved from the database transaction is displayed on the last line. When we ran our test on Tessell RDS and AWS RDS, we got the following results:
On Tessell RDS
On Amazon RDS
Conclusion
It is, therefore, safe to conclude that Tessell for PostgreSQL produced 460% higher IOPS as compared to AWS RDS for the identical SLOB workload at the same cost. The image below depicts the visual comparison of the performance benchmark results that Tessell for PostgreSQL and AWS RDS produce: