Memory Parameters
Memory Parameters
Shared_Buffers Work_Mem
Maintenance_Work_Mem AutoVacuum_Work_Mem
Shared_Buffers
It is a parameter determines how much
Shared Buffer 1 memory is dedicated to the server for caching
data.
W The value for shared_buffers should never be
R
R set to reserve all of the system RAM for
E
I Postgresql.
A OS Cache 2 The Default Value is 128MB.
T
D
E 25%- 40% of Ram is considered optimal for
Shared_Buffers.
4 1 2 5 2 3
Clock Sweep
The amount of memory to be used by internal sort
operations and hash tables before writing to temporary
disk files.
2. DISTINCT
4MB
Sort
3. MERGE JOINS
Work_Mem Disk - /Tmp files
4. HASH JOINS
Maximum amount of memory to be used by maintenance
operations, such as VACUUM, CREATE INDEX, and ALTER TABLE ADD
FOREIGN KEY.
Default is -1.
AUTOVACUUM_WORK_M
autovacuum is only able to utilize up to a maximum
EM of 1GB of memory.