Postgresql filling data files fast

Started by djdenney, April 05, 2021, 04:59:41 PM

Previous topic - Next topic

djdenney

Hello,

I am running postgresql 12.1.2 and am experiencing /var/lib/pgsql/base/16384 filling up quite rapidly.  I started out with 4G in /var/lib/pgsql filesystem and it went to 100% full.  I doubled it to 8G and 4 days later, it is 100% full again.  There are 1573 files in base/16384. no large files, just many files. Two files at 168M and the rest 66M or less.

Is this usual?  How large should the filesystem be?  Can these files be removed?

Alex Kirhenshtein

Hello.

It depends on your setup.
How many nodes do you monitor? How many DCIs and how often they are collected? How many events / alarms per day? Do you collect syslog?

djdenney

We are monitoring ~60 nodes, mostly VMs.  We collect DCIs for performance.  We monitor using the default event processing policies and we do collect syslog.  I am not seeing a but a few alarms per day after I disables the DCI change alarm.

Filipp Sudanov

Pls execute "sh st" in Tools -> Server Console and show the output.

Connect to postgres database and show the output of this query:

select schemaname as table_schema,
    relname as table_name,
    pg_size_pretty(pg_total_relation_size(relid)) as total_size,
    pg_size_pretty(pg_relation_size(relid)) as data_size,
    pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid))
      as external_size
from pg_catalog.pg_statio_user_tables
order by pg_total_relation_size(relid) desc,
         pg_relation_size(relid) desc
limit 50;