Caching Levels
There are several levels of caching used in a typical server — here they are, in order of increasing distance from the
cpu:
| 1. | Cpu cache |
| 2. | Random-Access Memory (RAM) |
| 3. | Storage controller cache |
| 4. | Storage device (disk) cache |
All of these are a fixed size and set at hardware installation time, i.e. you can't move cache from one level to another. For Postgres,
there is flexibility in how #2, random-access memory, is allocated, and this provides a never-ending opportunity for administrators to
optimize their systems. The three RAM allocation possibilities are:
- shared_buffers
- work_mem
- Kernel cache




