This topic describes the OLTP performance test results of PolarDB for PostgreSQL 14 and similar PostgreSQL 14 cloud-native databases.
Overview
Compared with similar PostgreSQL 14 cloud-native databases, PolarDB for PostgreSQL 14 optimizes in the following features to improve the overall performance:
- PolarDB for PostgreSQL adopts leading hardware technologies, including the Optane solid-state drive (SSD) of the 3D XPoint storage medium, NVMe SSDs, and RDMA over Converged Ethernet (RoCE).
- PolarDB for PostgreSQL implements a set of I/O and network protocol stacks that run in user mode based on new hardware. This improves performance and reduces latency.
- PolarDB for PostgreSQL uses the Polar Commit Sequence Number (CSN) feature to replace xid transactions of the native PostgreSQL with monotonically increasing 64-bit integers to improve OLTP performance in high concurrency scenarios.
- The read-ahead, pre-extension, and rel_size_cache features are provided to reduce the number of I/O reads and writes and improve performance.
Note For more information about test steps, see OLTP performance test.
Test environment and specifications
The following table lists the environments and specifications of PolarDB for PostgreSQL 14 and similar PostgreSQL 14 cloud-native databases.
Description | PolarDB for PostgreSQL 14 | Similar PostgreSQL cloud-native database |
---|---|---|
Cores and memory | 8 cores and 64 GB of memory | 8 cores and 64 GB of memory |
Concurrency | 256 | 256 |
PostgreSQL version | 14 | 14 |
Disk performance level | PSL5 | Default |
Note For kernel parameters, PolarDB for PostgreSQL 14 and similar PostgreSQL 14 cloud-native databases use default values.
Test workloads
Sysbench includes seven scenarios: oltp_insert, oltp_point_select, oltp_read_only, oltp_read_write, oltp_update_index, oltp_update_non_index, and oltp_write_only. The following table describes the test details for each scenario.
Parameter | Scenario | Test details |
---|---|---|
Write-only | oltp_insert | Insert a table. |
oltp_update_index | Update a table with indexes. | |
oltp_update_non_index | Update a table without indexes. | |
oltp_write_only | Insert, update, and delete a table. | |
Read-only | oltp_point_select | Point query. |
oltp_read_only | Point query and range query. | |
Read and write | oltp_read_write | oltp_write_only and oltp_read_only. |
Metrics
Transactions per second (TPS): the number of transactions that are performed per second in the database. Only committed transactions are counted.
Test data
The following table lists the test data.
Parameter | Description |
---|---|
Number of tables | 8 |
Number of rows | 64,000,000 |
Total data size | 128 GB |
Performance comparison results
- Write-only
TPS or instance type PolarDB for PostgreSQL 14 Similar PostgreSQL 14 database oltp_insert 26894.32 12787.40 oltp_update_index 26794.94 8112.62 oltp_update_non_index 27799.49 10037.60 oltp_write_only 10254.72 4227.12 - Read-only
TPS or instance type PolarDB for PostgreSQL 14 Similar PostgreSQL 14 database oltp_point_select 87774.29 26358.05 oltp_read_only 3421.84 1489.13 - Read and write
TPS or instance type PolarDB for PostgreSQL 14 Similar PostgreSQL 14 database oltp_read_write 1953.10 846.73