PostgreSQL 10.0 preview 性能增强 - pg_xact align(cacheline对齐)

通过cacheline对齐技术优化PostgreSQL在高并发场景下的性能表现,实验结果显示在特定环境下性能显著提升。

标签

PostgreSQL , 10.0 , cacheline对齐 , pgxact


背景

cacheline对齐,可以大幅提升高并发下的性能。

Hackers,  

originally this idea was proposed by Andres Freund while experimenting with  
lockfree Pin/UnpinBuffer [1].  
The patch is attached as well as results of pgbench -S on 72-cores  
machine.  As before it shows huge benefit in this case.  
For sure, we should validate that it doesn't cause performance regression  
in other cases.  At least we should test read-write and smaller machines.  
Any other ideas?  

1.  
https://www.postgresql.org/message-id/20160411214029.ce3fw6zxim5k6a2r@alap3.anarazel.de  

------  
Alexander Korotkov  
Postgres Professional: http://www.postgrespro.com  
The Russian Postgres Company  

测试

I already had the results with both the patches applied. But, as I was not
quite
able to understand on how Simon's patch for reducing pgxact access could
negate the regression on read-write workload that we saw with pgxact-align-3
patch earlier, I was slightly hesitant to share the results. Anyways, here
are
the results with combined patches on readonly and readwrite workload:

1) Results for read-only workload:
========================
pgbench -i -s 300 postgres
pgbench -M prepared -c $thread -j $thread -T $time_for_reading -S postgres

where, time_for_reading = 10mins
*non default param:*
shared_buffers=8GB
max_connections=300

CLIENT COUNT TPS (HEAD) TPS (PATCH) % IMPROVEMENT
4 36333 36835 1.381664052
8 70179 72496 3.301557446
16 169303 175743 3.803831001
32 328837 341093 3.727074508
64 363352 399847 10.04397939
72 372011 413437 11.13569222
128 443979 578355 30.26629638
180 321420 552373 71.85396055
196 276780 558896 101.927885
256 234563 568951 142.5578629

2) Results for read-write workload:
=========================
pgbench -i -s 300 postgres
pgbench -M prepared -c $thread -j $thread -T $time_for_reading  postgres

where, time_for_reading = 30mins

non default param:
shared_buffers=8GB
max_connections=300


CLIENT COUNT TPS (HEAD) TPS (PATCH) % IMPROVEMENT
4 2683 2690 0.2609019754
8 5321 5332 0.2067280586
16 10348 10387 0.3768844221
32 19446 19754 1.58387329
64 28178 28198 0.0709773582
72 28296 28639 1.212185468
128 28577 28600 0.0804843056
180 26665 27525 3.225201575
196 27628 28511 3.19603301
256 28467 28529 0.2177960445

HEAD is basically referring to the following git commit in master branch,

commit 5dbdb2f799232cb1b6df7d7a85d59ade3234d30c
Author: Robert Haas <rhaas(at)postgresql(dot)org>
Date:   Fri Feb 24 12:21:46 2017 +0530

    Make tablesample work with partitioned tables.

    This was an oversight in the original partitioning commit.

    Amit Langote, reviewed by David Fetter

--
With Regards,
Ashutosh Sharma
EnterpriseDB:http://www.enterprisedb.com

这个patch的讨论,详见邮件组,本文末尾URL。

PostgreSQL社区的作风非常严谨,一个patch可能在邮件组中讨论几个月甚至几年,根据大家的意见反复的修正,patch合并到master已经非常成熟,所以PostgreSQL的稳定性也是远近闻名的。

参考

https://commitfest.postgresql.org/13/974/

https://www.postgresql.org/message-id/flat/CAPpHfdtJY4zOEDsjad6J5AyZMqZcv6gSY9AkKpA7qN3jyQ2+1Q@mail.gmail.com#CAPpHfdtJY4zOEDsjad6J5AyZMqZcv6gSY9AkKpA7qN3jyQ2+1Q@mail.gmail.com

### 回答1: postgresql10.0_x64-haosq.zip是一个文件名,它表示的是一个带有哈斯克编译器的64位PostgreSQL 10.0版本的压缩包。 PostgreSQL是一个功能强大且可扩展的开源关系数据库管理系统。它支持多种操作系统,包括Windows、Linux和Mac OS等。在这个压缩包中,"x64"表示支持64位操作系统,"haosq"可能是压缩包的创建者或者对该版本进行了某种修改。 要安装该版本的PostgreSQL,首先需要解压缩这个压缩包。然后,可以按照官方提供的安装指南进行安装和配置。在安装完成后,可以通过命令行或者可视化界面工具来管理和使用PostgreSQL数据库PostgreSQL 10.0版本在性能、安全性和功能方面有很多改进和新增的特性。其中包括改进的并行查询处理、逻辑复制、数据分区、JSONB索引等等。这些功能可以提升数据库性能和灵活性,使其更适合处理复杂的数据工作负载。 总之,postgresql10.0_x64-haosq.zip是一个64位的PostgreSQL 10.0版本的压缩包,你可以使用它来安装和配置这个强大的开源数据库管理系统。 ### 回答2: postgresql10.0_x64-haosq.zip是一个PostgreSQL数据库的安装文件。PostgreSQL是一个开源的关系型数据库管理系统,具有高度稳定性和可靠性,广泛应用于各种规模的应用程序和网站开发中。 这个压缩文件中的x64表示适用于64位操作系统的安装版本。haosq是一个识别码,可能是某个发行版本的标识或个人定制版本的命名。 安装PostgreSQL通常需要以下步骤:首先,解压缩haosq.zip文件到你希望安装的目录。然后,运行安装文件来启动安装向导,按照向导的指示完成安装过程。在安装过程中,你可以选择安装的组件和配置选项,例如选择安装PostgreSQL服务器、客户端和相关工具、选择安装位置等。安装完成后,你需要配置数据库的初始设置,例如设置用户名、密码、监听地址和端口等。 安装完成后,你可以使用PostgreSQL提供的命令行工具或者可视化管理工具来管理数据库。你可以创建数据库、创建表和索引、执行SQL查询、导入导出数据等。PostgreSQL还支持事务和并发控制,提供了各种高级功能和扩展。 总之,postgresql10.0_x64-haosq.zip是一个PostgreSQL数据库的安装文件,通过它可以方便地安装和使用PostgreSQL数据库
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值