I have a small database PostgreSQL (v9.3) on Centos 6 x64 ( RAM: 8 GB ).
postgresql.conf
max_connections = 512
shared_buffers = 3000MB
temp_buffers = 8MB
work_mem = 2MB
maintenance_work_mem = 128MB
effective_cache_size = 3000MB
About 150 connections, PostgreSQL takes more than 6 GB of RAM (of course, other applications use about 200 MB of RAM), here my info:
Mem: 7062.945M total, 6892.410M used, 170.535M free, 6644.000k buffers
Swap: 0.000k total, 0.000k used, 0.000k free, 5378.922M cached
Questions:
Why does PG takes a lot of RAM ?
How can I reduce cached buffers of PG ?