All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

PostgreSQL Double Buffering: Why OS RAM and Buffer Cache Compete and How the 25% Rule Helps

By

Tiger Data (creators of TimescaleDB)

3d ago· 9 min readenInsight

Summary

This article explains the problem of double buffering in PostgreSQL, where the OS filesystem cache and PostgreSQL's shared_buffers both cache the same data, leading to wasted RAM, increased latency, and degraded query performance. It introduces the "25% shared_buffers rule" as a guideline to mitigate this issue, explaining how to properly size the PostgreSQL buffer cache relative to available system memory to reduce competition between the two caches.

Key quotes

· 3 pulled
Learn how PostgreSQL double buffering wastes RAM, increases latency, and hurts query performance — plus the 25% shared_buffers rule to fix it.
PostgreSQL's buffer cache and the OS filesystem cache often cache the same data, leading to inefficient memory usage.
The 25% shared_buffers rule is a practical guideline to balance memory allocation between PostgreSQL and the operating system.
Snippet from the RSS feed
Learn how PostgreSQL double buffering wastes RAM, increases latency, and hurts query performance — plus the 25% shared_buffers rule to fix it.

You might also wanna read