当前位置:网站首页>Yyds dry goods inventory accelerating vacuum in PG
Yyds dry goods inventory accelerating vacuum in PG
2022-07-02 02:30:00 【YZS column】
Speed up PG in vacuum
once VACUUM After process initiation ,VACUUM Can a big watch speed up ?
In short , once vacuum start-up , It is impossible to affect its speed . The main reason is , Most of the resources of this process are used for disk operation , These operations are not too fast . Besides , Still leave enough resources for regular database processes . Consider this , Changing some system parameters can allow separate VACUUM The working process accelerates its performance .
So , The configuration is quite “ radical ” Configuration of . such VACUUM Processes can be initiated more frequently , But with every start , These processes require less operation , Thus reducing the overall working time .
Here is AUTOVACUUM Parameter configuration :
1) Configure the right autovacumm_max_workers( The default value is 3, This value is low , therefore 10 Right or left )
2) increase AUTOVACUUM Check the frequency of initiation (autovacuum_naptime=1s, The default value is 1 minute )
3) Reduce auto trigger AUTOVACUUM Threshold of initiation .(autovacuum_vacuum_threshold=50
,autovacuum_analyze_threshold=10,autovacuum_vacuum_scale_factor=0.05,
autovacuum_analyze_scale_factor=0.05)
4) Lower trigger FREEZE The threshold of (autovacuum_freeze_min_age=5000000, vacuum_freeze_table_age=15000000)
autovacuum_max_workers It takes effect after the service is restarted , Other parameters are not required . Using the above parameters will increase AUTOVACUUM Frequency of accessing the table , At the same time, the work is broken down into smaller parts . thus VACUUM Will need to reduce the workload share , And in turn speed up the execution of the overall order .
in addition , One is more “ radical ” The parameter value of can be used for VACUUM command (vacuum_cost_delay=0, vacuum_cost_page_hit=0, vacuum_cost_page_miss=1, vacuum_cost_page_dirty=10, vacuum_cost_limit=100). This allows VACUUM Use more resources , At the expense of other service processes , And reduces the pause limit between service workloads .
original text
https://dataegret.com/2022/01/accelerating-vacuum-in-postgres/
https://clm141.xyz/hash/8fe5aadd6030c00f51a73abacfcba15be9ff7233.html
边栏推荐
- CoordinatorLayout + TabLayout + ViewPager2(里面再嵌套一个RecyclerView),RecyclerView的滑动冲突解决
- 研发中台拆分过程的一些心得总结
- A quick understanding of analog electricity
- What is the function of the headphone driver
- leetcode2311. Longest binary subsequence less than or equal to K (medium, weekly)
- Sword finger offer 62 The last remaining number in the circle
- 软件开发生命周期 --瀑布模型
- 【深度学习】infomap 人脸聚类 facecluster
- pytest 测试框架
- 【无标题】
猜你喜欢
LeetCode刷题(十)——顺序刷题46至50
leetcode2310. The one digit number is the sum of integers of K (medium, weekly)
Ar Augmented Reality applicable scenarios
【OpenCV】-5种图像滤波的综合示例
How to batch add background and transition effects to videos?
AR增强现实可应用的场景
[learn C and fly] 1day Chapter 2 (exercise 2.2 find the temperature of Fahrenheit corresponding to 100 ° f)
Comparative analysis of MVC, MVP and MVVM, source code analysis
附加:信息脱敏;
CVPR 2022 | 大连理工提出自校准照明框架,用于现实场景的微光图像增强
随机推荐
[reading notes] programmer training manual - practical learning is the most effective (project driven)
C # use system data. The split mixed mode assembly is generated for the "v2.0.50727" version of the runtime, and it cannot be loaded in the 4.0 runtime without configuring other information
Sword finger offer 47 Maximum value of gifts
Summary of some experiences in the process of R & D platform splitting
Leetcode question brushing (10) - sequential question brushing 46 to 50
Open那啥的搭建文档
flutter 中間一個元素,最右邊一個元素
[question] - why is optical flow not good for static scenes
Which brand of sports headset is better? Bluetooth headset suitable for sports
【做题打卡】集成每日5题分享(第二期)
A quick understanding of analog electricity
DNS domain name resolution
flutter 中间一个元素,最右边一个元素
Architecture evolution from MVC to DDD
LFM signal denoising, time-frequency analysis, filtering
leetcode2305. Fair distribution of biscuits (medium, weekly, shaped pressure DP)
Questions d'entrevue
[liuyubobobo play with leetcode algorithm interview] [00] Course Overview
how to come in an investnent bank team
【毕业季】研究生学长分享怎样让本科更有意义