PostgreSQL - Memory

前端之家收集整理的这篇文章主要介绍了PostgreSQL - Memory前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Here is a list of recommended parameters for memory management in Postgresql.

You should take into account mainly the following parameters.

shared_buffers
work_mem
maintenance_work_mem
effective_cache_size

About@H_404_14@shared_buffers:

  • Below 2GB,set to 20% of total system memory.
  • Below 32GB,set to 25% of total system memory.
  • Above 32GB,set to 8GB

About@H_404_14@work_mem,this parameter can cause a huge speed-up if set properly,however it can use that amount of memory per planning node.
Here are some recommendations to set it up.

  • Start low: 32-64MB
  • Look for ‘temporary file’ lines in logs
  • Set to 2-3x the largest temp file

About@H_404_14@maintenance_work_mem,here are some recommandations:

  • 10% of system memory,up to1GB
  • Maybe even higher if you are having VACUUM problems

About@H_404_14@effective_cache_size,here are some guidelines.

  • Set to the amount of file system cache available
  • If you don’t know,set it to 50% of total system memory
原文链接:https://www.f2er.com/postgresql/196263.html

猜你在找的Postgre SQL相关文章