0

I have postgresql(Master and Slave) infrastructure. The postgresql server have 32 GB RAM and 600 MB swap space. We are using java(tomcat) applications. I have performed postgresql tuning using http://pgtune.leopard.in.ua/. But currently my issue is, my postgresql server caching and swap memory increasing periodically and certain point we forced to clear the cache or restart the postgresql. Could you please let me with the reason behind it. Below are my performance tuning parameter. Rest of the parameters are default. Also we are using pgbarman to take the point of time backup which configure on other server.

postgresql.conf
===============
  max_connections = 300
  shared_buffers = 8GB
  effective_cache_size = 24GB
  work_mem = 27962kB
  maintenance_work_mem = 2GB
  checkpoint_segments = 32
  checkpoint_completion_target = 0.7
  wal_buffers = 16MB
  default_statistics_target = 100 

/etc/sysctl.conf
================
kernel.shmmax=17179869184
kernel.shmall=4194304
devops
  • 173
  • 4
  • 16
  • What do you mean by "server caching memory" and how are you measuring that? – Peter Eisentraut Feb 23 '17 at 20:24
  • ave checked the buffere+cachng memory using free command. prash@postgresmaster ~$ free total used free shared buffers cached Mem: 32632272 32234640 397632 0 72652 30869084 -/+ buffers/cache: 1292904 31339368 Swap: 688124 67164 620960 – devops Feb 24 '17 at 12:39
  • I don't think this is really a problem. You would expect a process to use kernel cache memory if nothing else is running on the system. – Peter Eisentraut Feb 24 '17 at 18:35
  • The issue is after some period of time(May after 15 days), system swap space get filled and system will go for a "Out of Memory" . Is there any way we can specifically declare the buffer memory limit for postgres process. – devops Feb 28 '17 at 02:52
  • Seems like this more of an issue with the instance you are running on not your postgres db. – VynlJunkie Dec 02 '21 at 17:47

0 Answers0