amount of data APM receives daily for postgres database
search cancel

amount of data APM receives daily for postgres database

book

Article ID: 413079

calendar_today

Updated On:

Products

CA Application Performance Management (APM / Wily / Introscope)

Issue/Introduction

wants to know the amount of data APM receives daily for postgres database.

Environment

APM 10.8 SP1 cluster

Resolution

Deterring the Postgres database growth per day (data that Postgres is receiving for each day)

To determine the amount of data APM receives daily for Postgres database,
one should take a look on size of tables to decide for the environment. 

Run the following queries in the Postgres SQL to get further details about the amount of data APM receives daily for Postgres database.

You get the name of the Postgres database from <MOM/Collector-home>/config/tess-db-cfg.xml

Example: 
 <property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/apmdb108</property>

Then connect to the database and run the following queries.

To get database size;

SELECT pg_size_pretty(pg_database_size('your_database_name'));

SELECT pg_size_pretty(pg_database_size('apmdb108'));


To get tables size in the postgres database;

SELECT
    relname AS table_name,
    pg_size_pretty(pg_total_relation_size(oid)) AS total_size
FROM
    pg_class
WHERE
    relkind = 'r' AND relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = 'public')
ORDER BY
    pg_total_relation_size(oid) DESC;
    

Monitor the following tables as these gets the most data each day.

Total count:
select count(*) from appmap_vertices;
select count(*) from appmap_attribs;
select count(*) from appmap_edges;

Past 1 days:
select count(*) from appmap_vertices where start_time > (CURRENT_DATE - INTERVAL '1 day');
select count(*) from appmap_attribs where start_time > (CURRENT_DATE - INTERVAL '1 day');
select count(*) from appmap_edges start_time > (CURRENT_DATE - INTERVAL '1 day');

There may be other tables which may grow more then normal based on the environment. You can use the same query to get growth rate.

Also, there are status tables that get created for each day.