当前位置: 首页 > news >正文

PostgreSQL 11 preview - pgbench 支持大于1000链接(ppoll()代替select())

标签

PostgreSQL , pgbench , ppoll


背景

目前pgbench最大可以测试1000个连接,显然在某些时候是不够的,我们可能需要建立更多的连接进行测试。

$ pgbench -j 3000 -c 1500  
invalid number of clients: "1500"  

使用这里提到的方法修改一下pgbench,让它能够建立100万个连接。

《从PostgreSQL支持100万个连接聊起》

PostgreSQL 11这块会改掉,使用ppoll代替select,超过1000个连接。

[trying again for 2018-01]  
  
This patch enables building pgbench to use ppoll() instead of select()  
to allow for more than (FD_SETSIZE - 10) connections.  As implemented,  
when using ppoll(), the only connection limitation is system resources.  
  
The patch has been implemented to introduce a minimal of #ifdef/#ifndef  
clutter in the code.  
  
Without this patch, one is limited to '(FD_SETSIZE - 10)’ number of connections.  
Example of something that fails without this patch but works with the patch:  
  
Without the patch:  
  
$ pgbench -j 3000 -c 1500  
invalid number of clients: "1500"  
  
  
With the patch:  
  
$ pgbench -j 3000 -c 1500  
starting vacuum...end.  
transaction type: <builtin: TPC-B (sort of)>  
scaling factor: 2000  
query mode: simple  
number of clients: 1500  
number of threads: 1500  
number of transactions per client: 10  
number of transactions actually processed: 15000/15000  
latency average = 631.730 ms  
tps = 2374.430587 (including connections establishing)  
tps = 4206.524986 (excluding connections establishing)  
  
  
  
doug  
--  
Doug Rady  
Amazon Aurora, RDS PostgreSQL  
radydoug(at)amazon(dot)com  

参考

https://www.postgresql.org/message-id/flat/3B729131-C891-41F3-B911-8DEB05515D63@amazon.com#3B729131-C891-41F3-B911-8DEB05515D63@amazon.com

相关文章:

  • 数字操作符九度OJ 1019 简单计算器
  • NO1 ip-systemctl-fdisk
  • 执行对象cocos2d-x 2.x action动作整理集合
  • MySQL主从复制介绍
  • C# 使用GDI+绘制漂亮的ToolStrip和StatusStrip皮肤(转载)
  • Win32编程点滴3 - 简单ActiveX控件的使用
  • 禁止鼠标选中文字
  • HDU2553 N皇后问题
  • [转]给年轻工程师的十大忠告
  • Flutter 安装
  • CYQ.Data V5 批量插入与批量更新示例
  • Java知识点总结(JavaIO-打印流)
  • 在Java中使用Lua脚本语言
  • python正则
  • [HEOI2013]ALO
  • 30秒的PHP代码片段(1)数组 - Array
  • Akka系列(七):Actor持久化之Akka persistence
  • Docker容器管理
  • Fastjson的基本使用方法大全
  • jQuery(一)
  • js操作时间(持续更新)
  • python_bomb----数据类型总结
  • react-core-image-upload 一款轻量级图片上传裁剪插件
  • Redux 中间件分析
  • use Google search engine
  • WePY 在小程序性能调优上做出的探究
  • 包装类对象
  • 关于for循环的简单归纳
  • 开发基于以太坊智能合约的DApp
  • 吴恩达Deep Learning课程练习题参考答案——R语言版
  • TPG领衔财团投资轻奢珠宝品牌APM Monaco
  • ​Spring Boot 分片上传文件
  • ​人工智能书单(数学基础篇)
  • ​软考-高级-信息系统项目管理师教程 第四版【第23章-组织通用管理-思维导图】​
  • #162 (Div. 2)
  • #if和#ifdef区别
  • #NOIP 2014# day.1 T2 联合权值
  • %3cli%3e连接html页面,html+canvas实现屏幕截取
  • (Matalb分类预测)GA-BP遗传算法优化BP神经网络的多维分类预测
  • (非本人原创)史记·柴静列传(r4笔记第65天)
  • (附源码)ssm教师工作量核算统计系统 毕业设计 162307
  • (紀錄)[ASP.NET MVC][jQuery]-2 純手工打造屬於自己的 jQuery GridView (含完整程式碼下載)...
  • (转)母版页和相对路径
  • .bat批处理(八):各种形式的变量%0、%i、%%i、var、%var%、!var!的含义和区别
  • .NET / MSBuild 扩展编译时什么时候用 BeforeTargets / AfterTargets 什么时候用 DependsOnTargets?
  • .NET Core引入性能分析引导优化
  • .NET 反射 Reflect
  • .sdf和.msp文件读取
  • :O)修改linux硬件时间
  • @ 代码随想录算法训练营第8周(C语言)|Day57(动态规划)
  • @angular/cli项目构建--Dynamic.Form
  • @CacheInvalidate(name = “xxx“, key = “#results.![a+b]“,multi = true)是什么意思
  • @RequestMapping用法详解
  • @德人合科技——天锐绿盾 | 图纸加密软件有哪些功能呢?
  • [ 转载 ] SharePoint 资料