This topic describes the OLTP performance test results of PolarDB for PostgreSQL 14 and open-source PostgreSQL 14.

Overview

Compared with open-source PostgreSQL 14, PolarDB for PostgreSQL 14 optimizes in the following features to improve the overall performance:
  • PolarDB for MySQL 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 MySQL 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 open-source PostgreSQL 14. Open-source PostgreSQL 14 is deployed on ECS instances in the test.
Parameter PolarDB for PostgreSQL 14 Open-source PostgreSQL 14
Cores and memory 8 cores and 64 GB of memory 8 cores and 64 GB of memory
ECS isntance type ecs.c5.4xlarge ecs.c5.4xlarge
Concurrency 256 256
PostgreSQL version 14 14
Disk performance level PSL5 cloud_essd+PL3
Reserved disk space Auto-scaling and no limit 4 TB
Note For kernel parameters, PolarDB for PostgreSQL 14 and open-source PostgreSQL 14 use the same values for performance parameters and other parameters adopt 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-onlyWrite-only
    TPS or instance type PolarDB for PostgreSQL 14 Open-source PostgreSQL 14
    oltp_insert 43129.08 41161.66
    oltp_update_index 32492.36 3710.60
    oltp_update_non_index 30929.04 5367.59
    oltp_write_only 9492.40 1294.47
  • Read-onlyRead-only
    TPS or instance type PolarDB for PostgreSQL 14 Open-source PostgreSQL 14
    oltp_point_select 88967.60 14566.05
    oltp_read_only 4834.21 570.62
  • Read and writeRead and write
    TPS or instance type PolarDB for PostgreSQL 14 Open-source PostgreSQL 14
    oltp_read_write 1738.51 306.39