Enabling transparent data encryption (TDE) on RDS for MySQL adds encryption overhead that reduces query throughput and increases CPU usage. This report provides measured performance data across two instance sizes and multiple workload types to help you decide whether the trade-off fits your workload.
Before you enable TDE
Performance impact: at low concurrency, TDE reduces throughput by up to 20%. At high concurrency, the loss drops below 5%, largely because of I/O merging.
Workload sensitivity: write-intensive workloads (oltp_write_only, oltp_update_index) show the highest overhead.
Test conclusions
Low concurrency: performance loss is up to 20%.
High concurrency: performance loss drops to below 5%, largely due to I/O merging.
Write-intensive workloads (oltp_write_only, oltp_update_index) show the most significant overhead.
CPU utilization increase when TDE is enabled and encrypted tables are accessed:
4-core 16 GB instance: +0.06% to +4.22%
8-core 32 GB instance: +0.12% to +2.86%
Test environment
| Configuration item | Scenario 1 | Scenario 2 |
|---|---|---|
| Region and zone | cn-hangzhou | cn-hangzhou |
| Network type | Virtual Private Cloud (VPC) | Virtual Private Cloud (VPC) |
| Hardware architecture | x86-64 | x86-64 |
| Storage type | Premium Local SSDs | Premium Local SSDs |
| CPU | 4 cores | 8 cores |
| Memory | 16 GB | 32 GB |
| Buffer Pool size | 12 GB | 24 GB |
| Maximum IOPS | 7,000 | 12,000 |
| Instance version | mysql80_8.0.28_20230610 | mysql80_8.0.28_20230610 |
| Test dataset size | 41 GB | 41 GB |
Test tool
Sysbench is an open-source, modular, cross-platform, multi-threaded benchmark tool for evaluating database performance under load.
Test metrics
TPS (Transactions Per Second): the number of transactions the database commits per second.
Average latency: the average time to execute a transaction, measured in milliseconds (ms).
Test table schema
All tests use the default Sysbench table schema:
CREATE TABLE `sbtest8` (
`id` int NOT NULL AUTO_INCREMENT,
`k` int NOT NULL DEFAULT '0',
`c` char(120) NOT NULL DEFAULT '',
`pad` char(60) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `k_8` (`k`)
) ENGINE=InnoDB AUTO_INCREMENT=100001 DEFAULT CHARSET=utf8mb3Test procedure
This procedure measures the performance of accessing encrypted tables on a TDE-enabled MySQL instance across different workload models.
On a Linux ECS instance, install the MySQL client:
CentOS:
sudo yum install mysqlUbuntu:
sudo apt-get updatethensudo apt install mysql-server
Connect to the RDS for MySQL database:
To get the database endpoint and port number, see View and manage instance endpoints and ports.
mysql -h<database_endpoint> -u<username> -P<port_number> -p<password>Exit the database, then use Sysbench to load test data. This test loads 128 tables with 100,000 records each. The example below uses the
oltp_read_writemodel with 16 threads. Replace--threads=16with the thread count you want to test (valid values: 1, 8, 16, 32, 64, 128, 256).sysbench --db-driver=mysql \ --mysql-host=<database_endpoint> \ --mysql-port=<port_number> \ --mysql-user=<username> \ --mysql-password=<password> \ --mysql-db=testdb \ --table_size=1000000 \ --tables=128 \ --threads=16 \ --time=60 \ oltp_read_write prepareRun the test:
sysbench --db-driver=mysql \ --mysql-host=<database_endpoint> \ --mysql-port=<port_number> \ --mysql-user=<username> \ --mysql-password=<password> \ --mysql-db=testdb \ --table_size=1000000 \ --tables=128 \ --threads=16 \ --time=60 \ oltp_read_write runClean up test data:
sysbench --db-driver=mysql \ --mysql-host=<database_endpoint> \ --mysql-port=<port_number> \ --mysql-user=<username> \ --mysql-password=<password> \ --mysql-db=testdb \ --table_size=1000000 \ --tables=128 \ --threads=16 \ --time=60 \ oltp_read_write cleanup
Test scenario 1: 4-core 16 GB instance with Premium Local SSDs
TDE-off baseline: rds_ssd_4c16g_tde_off[3] TDE-on instance: rds_ssd_4c16g_tde_on[2]
Performance trend graphs


CPU utilization

Performance data summary



Test scenario 2: 8-core 32 GB instance with Premium Local SSDs
TDE-off baseline: rds_ssd_8c32g_tde_off[11] TDE-on instance: rds_ssd_8c32g_tde_on[12]
Performance trend graphs



Performance data summary


