Get the latest tech news
Memory Size Matters to PostgreSQL
Nowadays it’s not uncommon to deal with machines with hundreds of GB of RAM. Abundant memory can give PostgreSQL a massive performance boost. However things work slightly different than you may expect. Let’s find out!
While buffer_strategy_lock is held then no other locks of any sort should be acquired allowing the buffer replacement to happen in multiple backends with reasonable concurrency. However with memory less than 4 GB sizing correctly the shared buffer is not an easy task and depends on many factors including the vm settings on linux. It’s very important to understand the way the buffer manager deal with the block eviction in order to get the correct setting for the underlying data area.
Or read this on Hacker News