9 Aralık 2024 Pazartesi

PostgreSQL Shared Buffer

Giriş
Açıklaması şöyle
When you are sending a read or write request to Postgres, you are never interacting with the files directly. In order to read something, first those pages need to be loaded in shared_buffers! 
Proper Amount for Shared Buffer
Açıklaması şöyle
It is recommended in the docs: If (RAM > 1GB) shared_buffers = 25%
Official Docs: Values larger than 40% of RAM might NOT Help
Açıklaması şöyle
Pro tip: If you are setting a PostgreSQL or MySQL, don't use the default database settings because those are meant for personal computers or notebooks.

One example is the Buffer Pool size:

- For MySQL, increase the innodb_buffer_pool_size
- For PostgreSQL, increase shared_buffers and effective_cache_size to match your OS cache size
Örnek
postgresql.conf dosyasında şöyle yaparız
shared_buffers = 256MB effective_cache_size = 1GB
PG_BUFFERCACHE Extension
Shared Buffer kullanımını görmek için kullanılabilir

Hiç yorum yok:

Yorum Gönder