×
Community Blog Test: Which has better performance? ApsaraDB for RDS or a User-Created MySQL Database

Test: Which has better performance? ApsaraDB for RDS or a User-Created MySQL Database

Is buying database services really worth it in the end? To answer this question, we did a series of tests in two different scenarios.

Cloud in many ways is the driving force behind several technological innovations and is the element that facilitates the building of IT infrastructure nowadays. Among other products and services in the cloud, cloud databases are an important cloud product and used by a large portion of customers.

Interestingly, though, we found that our customers tend to use cloud databases in one of either two ways. They will either create a database on an Alibaba Cloud server or directly purchase a database service provided by Alibaba Cloud, such as ApsaraDB for RDS. But, what is the real difference between these two options? How can users, or how should users, choose between them?

This article attempts to answer the age-old question: is buying database services really worth it in the end? To answer this question, we did a series of tests in two different scenarios to find the results to let you see the clear answer to this question.

Really Worth it? How Does ApsaraDB for RDS and a User-Created MySQL Database Compare

Test Overview

The tests outlined in this post compare the performance of a MySQL 5.7 or 8.0 database based on an Alibaba Cloud ECS instance and a general-purpose ApsaraDB for RDS instance in the Online Transaction Processing (OLTP) read/write hybrid model. These tests use the standard Sysbench 1.0 tool and a database with 4 CPU cores and 16 GB memory, which represents the most commonly used specification. Specifically, the innodb_buffer_pool_size configuration is 12 GB.

Test Scenarios

We tested the following three scenarios:

  1. Memory hit: For this scenario, 150 tables are available, and each table contains about 2 GB of data in 25,000 lines. In this test, the CPU is the first thing to encounter a bottleneck.
  2. Small-scale I/O: In this second scenario, 150 tables are available, and each table contains about 50 GB of data in 1.2 million lines. In this test, it's the CPU again that is the first thing to encounter a bottleneck.
  3. Large-scale I/O: In this last scenario, 150 tables are available, and each table contains about 200 GB of data in five million lines. For this test, the IOPS part is the first to encounter a bottleneck.

Test Conclusions

  1. When the CPU reaches its bottleneck first, the general-purpose RDS instance performs much better than the ECS-based user-created instance with local SSDs.
  2. When the IOPS reaches its bottleneck first, the general-purpose RDS instance performs slightly better than the ECS-based user-created instance with local SSDs.
  3. In all three scenarios, the general-purpose RDS instance performs better and has greater stability than the ECS-based user-created instance with local SSDs.

Read this blog to learn more about the test, including test environment and test data.

Related Tutorials

Migrating a Self-built MySQL Database to Alibaba Cloud RDS for MySQL with Minimal Downtime

This tutorial introduces the steps to migrate a self-built MySQL database to Alibaba Cloud RDS running MySQL with DTS utility to minimize the downtime.

Preparations
Before performing your database migration, some preparation work is required to be conducted first on the source database to ensure migration goes smoothly.

ApsaraDB for RDS

Migrating from a Relational PostgreSQL to ApsaraDB RDS for PostgreSQL

This tutorial introduces the ApsaraDB Stack which will free you from the administrative tasks often associated with managing your corporate data.

About ApsaraDB

Traditionally, databases have resided within instances of a database server such as SQL Server, MySQL, MongoDB, and others.

Sometimes the database engine runs on the same server as the application whose data it stores. For example, a single Linux server might run Apache, PHP, and MySQL.

As the application scales and more performance is required, moving the database to its own server is the obvious next step. Just set up a new Linux or Windows server, install the requisite database engine and migrate the data. Then it's just a case of changing some configuration files within the application code to point the application at the new database server.

As part of the world moved towards cloud computing infrastructure, new database server architecture arrived. Cloud providers such as Alibaba Cloud now offer database server instances as a service. No longer is there any need to run a dedicated Windows or Linux server purely to host a copy of MySQL or SQL Server. No longer do you need to patch your database server or manage its security.

Alibaba Cloud's database service is called ApsaraDB and it's currently available for SQL Server, MySQL, PostgreSQL, and Postgres Plus Advanced Server (PPAS), which is compatible with Oracle.

ApsaraDB instances are fast, cost-effective, easy to back up, and very quick to scale when you need additional performance. They all run on SSD drives and you simply pay according to the amount of data you process. If you need more performance or storage, it can be arranged with just a few clicks on the management console. Pricing is based on a monthly subscription that starts from USD 29. Or if you prefer, a pay-as-you-go option starts from less than 3 cents ($0.29) per hour provided that your ApsaraDB instance is active (storage and Internet traffic are additional costs).

Just as with a cloud-based Linux or Windows server instance, ApsaraDB database instances include a comprehensive monitoring system that's built-in. You can keep a close eye on the performance of your hosted databases, to help you make decisions about whether additional resources might be required. You can set alarms and triggers so that you will automatically be notified if performance or disk space falls below specified thresholds.

With an ApsaraDB instance, there's no underlying operating system or virtual server for you to pay for, secure, patch, or manage. You get to concentrate on managing just your database tables. Everything else is taken care of by Alibaba Cloud.

ApsaraDB includes security features such as real-time monitoring of network traffic, and automatic interception of SQL injection, brute force attacks, and other types of database attacks. This is all built into each ApsaraDB instance and does not need to be configured or purchased separately, as would be the case if you host your databases on a conventional cloud server running Linux or Windows and a separate relational database management system (RDBMS).

Related Products

ApsaraDB RDS for MySQL

MySQL is one of the most popular open-source databases in the world. As a key component of the open-source software bundle LAMP (Linux, Apache, MySQL, and Perl/PHP/Python), MySQL has been widely applied to different scenarios.

Related Solutions

Database Migration

Migrating to fully managed cloud databases brings a host of benefits including scalability, reliability, and cost efficiency. However, doing so without the necessary tooling can be as challenging as navigating without a map. Explore Alibaba Cloud's portfolio of fully managed database services, and learn how to leverage a rich set of utility tools and our database expert services to turn your migration experience into a hassle-free expressway.

0 0 0
Share on

Alibaba Clouder

2,605 posts | 747 followers

You may also like

Comments