简介
相对于同类PostgreSQL云原生数据库,PolarDB PostgreSQL版在以下几方面进行了优化,提升了整体性能:
- 采用了领先硬件技术,包括使用3DXpoint存储介质的Optane存储卡、NVMeSSD和RoCE RDMA网络等。
- 基于新的硬件,实现了一整套在用户态运行的IO和网络协议栈,获得了更高的性能、更低的延迟。
- 通过Polar CSN(Commit Sequence Number)技术,将原生PostgreSQL xid事务替换为单调递增的64位整型来提升高并发下OLTP性能。
- 借助预读、预扩展、rel_size_cache技术,可以有效减少IO读写次数,提升性能。
说明
具体测试步骤,请参见性能测试方法(OLTP)。
测试环境与规格
PolarDB for PostgreSQL 14和同类PostgreSQL 14云原生数据库的环境和规格如下表所示:
| 说明 | PolarDB for PostgreSQL 14 | 同类PostgreSQL云原生数据库 |
|---|---|---|
| 核数+内存 | 8核 64 GB | 8核 64 GB |
| 并发数 | 256 | 256 |
| PostgreSQL版本 | 14 | 14 |
| 磁盘性能等级 | PSL5 | 默认配置 |
说明
关于内核参数,PolarDB for PostgreSQL 14和同类PostgreSQL 14云原生数据库的参数均采用默认参数。
测试Workload说明
在Sysbench中,有七类场景,包括oltp_insert、oltp_point_select、oltp_read_only、oltp_read_write、oltp_update_index、oltp_update_non_index、oltp_write_only。各种场景的测试内容说明如下:
| 参数 | 场景 | 测试内容 |
|---|---|---|
| 写场景 | oltp_insert | 插入表。 |
| oltp_update_index | 更新带索引的表。 | |
| oltp_update_non_index | 更新不带索引的表。 | |
| oltp_write_only | 插入、更新、删除表混合测试。 | |
| 读场景 | oltp_point_select | 点查询。 |
| oltp_read_only | 点查询+范围查询。 | |
| 读写混合 | oltp_read_write | oltp_write_only+oltp_read_only混合测试。 |
衡量指标
TPS(Transactions Per Second):即数据库每秒执行的事务数,以COMMIT成功次数为准。
测试数据量
本次实验测试数据量如下表所示:
| 参数 | 说明 |
|---|---|
| 表数目 | 8 |
| 行数 | 64,000,000 |
| 总数据量 | 128 GB |
性能结果
- 写场景

性能结果
- 写场景
| TPS/实例类型 | PolarDB for PostgreSQL 14 | 同类PostgreSQL 14数据库 |
|---|---|---|
| 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 |
读场景

读场景
| TPS/实例类型 | PolarDB for PostgreSQL 14 | 同类PostgreSQL 14数据库 |
|---|---|---|
| oltp_point_select | 87774.29 | 26358.05 |
| oltp_read_only | 3421.84 | 1489.13 |
读写混合场景

读写混合场景
| TPS/实例类型 | PolarDB for PostgreSQL 14 | 同类PostgreSQL 14数据库 |
|---|---|---|
| oltp_read_write | 1953.10 | 846.73 |
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




