暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

PostgreSQL 商用版本EPAS(阿里云ppas(Oracle 兼容版)) NUMA 架构spin锁等待优化

digoal 2018-01-13
264

作者

digoal

日期

2018-01-13

标签

PostgreSQL , PPAS , enterprisedb , spin , 锁等待优化


背景

PostgreSQL商用版本EnterpriseDB,对于spin锁等待的一个优化,在NUMA架构的硬件中,当跨SLOT等待SPIN LOCK时,可能遇到性能问题,由于SPIN时CPU时间片被抢占,如果长时间等待会导致CPU空转的资源浪费。

通过设置edb_max_spins_per_delay参数,可以缓解这个性能问题。SPIN LOCK等待超过这个自旋次数,将进程转入sleep状态,从而释放CPU(CPU可以分配给其他进程使用),避免长时间占用CPU。

参数

edb_max_spins_per_delay

Parameter Type: Integer

Default Value: 1000

Range: {10 | 1000}

Minimum Scope of Effect: Per cluster

When Value Changes Take Effect: Restart

Required Authorization to Activate: EPAS service account

Use edb_max_spins_per_delay to specify the maximum number of times that a session will 'spin' while waiting for a spin-lock. If a lock is not acquired, the session will sleep. If you do not specify an alternative value for edb_max_spins_per_delay, the server will enforce the default value of 1000.

This may be useful for systems that use NUMA (non-uniform memory access) architecture.

参考

阿里云PPAS商用版本(兼容Oracle)

https://www.enterprisedb.com/docs/en/10.0/EPAS_Guide_v10/EDB_Postgres_Advanced_Server_Guide.1.24.html#pID0E0PRF0HA

PostgreSQL 许愿链接

您的愿望将传达给PG kernel hacker、数据库厂商等, 帮助提高数据库产品质量和功能, 说不定下一个PG版本就有您提出的功能点. 针对非常好的提议,奖励限量版PG文化衫、纪念品、贴纸、PG热门书籍等,奖品丰富,快来许愿。开不开森.

9.9元购买3个月阿里云RDS PostgreSQL实例

PostgreSQL 解决方案集合

德哥 / digoal's github - 公益是一辈子的事.

digoal's wechat

文章转载自digoal,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论