Our APM DB size is growing quickly and is affecting the performance of the environment so we are looking for a way to optimize the APM database.
How can we optimize the database when the database size is growing very quickly?
10.7
There were some issues in the GA version of APM that was causing a large amount of topological changes to be stored. As a result, the database size was growing very quickly and was making complexity of query evaluation hard.
To remedy this, one should take a look on size of tables to decide if cleanup procedure will be needed. These problems are fixed in hotfixes, so please install latest available.
Cleanup decision:
select external_id, history from (
select vertex_id, count(1) as history from appmap_vertices
where start_time > (CURRENT_DATE - INTERVAL '5 day')
group by vertex_id
order by 2 desc
limit 20) t
join appmap_id_mappings m on t.vertex_id=m.vertex_id;
Oracle:
select external_id, history from (
select vertex_id, count(1) as history from appmap_vertices
where start_time > (sysdate - 5)
group by vertex_id
order by 2 desc) t
join appmap_id_mappings m on t.vertex_id=m.vertex_id
where rownum < 20;
Optimize tables in Oracle:
alter table appmap_edges enable row movement;
alter table appmap_vertices enable row movement;
alter table appmap_attribs enable row movement;
alter table appmap_edges shrink space compact;
alter table appmap_vertices shrink space compact;
alter table appmap_attribs shrink space compact;
There is no need to stop the Enterprise Manager, it will just slow down a little bit the database.
- How can we tune Postgres database for Windows box with 16GB Memory?
https://knowledge.broadcom.com/external/article?articleId=16515
- How can we tune Oracle database with 64GB Memory?
https://knowledge.broadcom.com/external/article?articleId=16409
- How can we tune Postgres database for Linux box with 16GB Memory?
https://knowledge.broadcom.com/external/article?articleId=16381
- How to purge or reduce the size of a Postgresql APM database and optimize CEM data retention.
https://knowledge.broadcom.com/external/article?articleId=9486
- APM database is growing fast - too many appmap_states tables. Is there a property to prune those tables.
https://knowledge.broadcom.com/external/article?articleId=4232
- Oracle 11gR2 APM database is growing very large
https://knowledge.broadcom.com/external/article?articleId=20013