To calculate the correct value for shared_buffers
in a AWS RDS PostgreSQl database:
(2*1024*1024*12.5/100)/8)
# = 32768
The values:
2*1024*1024
- DB instance has
2 [GB]
of RAM. 1024*1024
convertsGB
tokB
.
- DB instance has
12.5/100
12.5 [%]
of the RAM should be assigned toshared_buffers
.
/8
- Postgres works with blocks of
8 [kB]
size.
- Postgres works with blocks of
So, if you would like to increase the value for shared_buffers
to 25 [%]
(instead of 12.5 [%]
), you would want to have:
(2*1024*1024*25/100)/8)
# = 65536