NetXMS Support Forum

English Support => General Support => Topic started by: djdenney on April 05, 2021, 04:59:41 PM

Title: Postgresql filling data files fast
Post by: djdenney on April 05, 2021, 04:59:41 PM
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?
Title: Re: Postgresql filling data files fast
Post by: Alex Kirhenshtein on April 06, 2021, 11:58:58 PM
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?
Title: Re: Postgresql filling data files fast
Post by: djdenney on April 07, 2021, 03:33:08 PM
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.
Title: Re: Postgresql filling data files fast
Post by: Filipp Sudanov on April 12, 2021, 07:06:00 PM
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;