This topic describes the test results of the online transaction processing (OLTP) performance on ApsaraDB RDS for MySQL instances for which the always-confidential database feature is enabled. The RDS instances run MySQL 8.0 and MySQL 5.7 on RDS High-availability Edition.
Background information
The test compares the database performance of the RDS instances in terms of queries per second (QPS) and response time (RT) by using the following query methods.
Plaintext query: No encryption rules are specified.
Ciphertext query: All columns of the test databases are encrypted.
The always-confidential database feature does not affect the write performances of RDS instances.
Instance specifications and test methods
The test is conducted by using the industry-standard stress test tool sysbench in read-only (oltp_read_only benchmark) and read/write (oltp_read_write benchmark) scenarios. The test uses different amounts of threads to simulate varying levels of loads in databases.
Instance specifications:
Instance type: mysql.n2.xlarge.2c
Instance family: general-purpose
RDS edition: RDS High-availability Edition
Storage type: Enterprise SSD (ESSD) of performance level 1 (PL1)
Engine version: one RDS instance that runs MySQL 8.0 with the minor engine version of 20240229 and the other RDS instance that runs MySQL 5.7 with the minor engine version of 20240229.
Test data:
Number of rows in a table: 25,000
Number of tables: 250
Test results
MySQL 5.7
Read-only

Threads | QPS for plaintext queries | QPS for ciphertext queries | RT for plaintext queries | RT for ciphertext queries |
64 | 14332.58 | 14021.94 | 71.43 | 73.01 |
128 | 28712.27 | 28097.95 | 71.32 | 72.87 |
256 | 51173.18 | 43663.67 | 80.02 | 93.79 |
Read/write

Threads | QPS for plaintext queries | QPS for ciphertext queries | RT for plaintext queries | RT for ciphertext queries |
64 | 14349.46 | 14073.52 | 89.18 | 90.93 |
128 | 28745.73 | 28480.96 | 89.03 | 89.86 |
256 | 52388.17 | 47524.69 | 97.69 | 107.69 |
MySQL 8.0
Read-only
Use Sysbench to test the read-only performance of the RDS instance by using a different number of threads. The following figure shows the test results.

Threads | QPS for plaintext queries | QPS for ciphertext queries | RT for plaintext queries | RT for ciphertext queries |
64 | 20957.01 | 20451.69 | 48.85 | 50.06 |
128 | 40395 | 40523.26 | 50.68 | 50.52 |
256 | 67328.31 | 53119.03 | 60.8 | 77.07 |
Read/write
Use Sysbench to test the read/write performance of the RDS instance by using a different number of threads. The following figure shows the test results.

Threads | QPS for plaintext queries | QPS for ciphertext queries | RT for plaintext queries | RT for ciphertext queries |
64 | 20201.55 | 19942.42 | 63.35 | 64.17 |
128 | 40133.36 | 40343.33 | 63.76 | 63.43 |
256 | 62039.77 | 46675.26 | 82.46 | 109.59 |
Usage notes
In this test, the data of all query results is encrypted. If only a few sensitive fields are encrypted in the database system, the performance of the RDS instance will be better than the test results.
The always-confidential database feature affects only the read performance of an RDS instance. Therefore, this feature has the most significant impact on instance performance in read-only scenarios, followed by a noticeable effect in read-write scenarios. The instance performance is not affected by this feature in write-only scenarios.
The always-confidential database feature mainly increases the CPU load but does not affect disk or memory resources.