Slow FMS startup; waiting on the Alarm Aggregation Service is a symptom noted in FMS log.
Can also cause high CPU utilization on Repository server due the query coming from the Foglight application server.
The Foglight Management Server (FMS) support bundle contains the DiagnosticSnapshot.txt, which provide information on topology object counts. High counts can affect performance. Searching "NUM EFFECTIVE" in a DiagnosticSnapshot.txt file brings us to the section for review.
| Topology Type | Num Instance Versions | Max Version | Num Effective|
| XXX | magnitude larger than N | thousands | N |
As of 5.5.8, the FMS should roll up old topology versions, that these numbers should decrease over time. However, some situations have so many historical versions (Num Instance Versions numbering in multi-millions) that the rollup cannot be completed in a single cycle. It gets left until next DB maintenance window (but then it likely will not complete then either). You might find some really big numbers remaining. The scripts can be run to clean those up.
Pre-5.5.8, these scripts can be used to do the cleanup on demand as the history rollup is not implemented in those versions.
From 5.6 it should not be a problem because the server will delete a lot of the old versions. However, if there is a very large amount of objects, then the topology history tables could grow quite a bit during the course of the day and be much larger than they need to be. There is also a possible issue of fragmentation, because of all the inserts and deletes performed on the table. The scripts will compact the table and remove any fragmentation.
FGL-11721 is fixed in 5.6 but if FMS had been upgraded from a previous version with large historical counts of topology objects, you can run the provided scripts in this solution on a 5.6.x or 5.7.x FMS.
Create new topology tables by copying across only the current version of the topology and then to drop the original tables which are copied to a .bak extension using the appropriate DB type scripts.
1) Download and extract the attached scripts
2) Shut down the FMS
3) Have your DBA run the recreate_topology_object_tables-<database type>.sql on the Foglight repository
NOTE: This script performs the following:
Drops the original indexes and constraints and builds new ones
4) Check that the script completes without error. It has been known to take some time on large databases
5) Restart the Foglight Server
6) Login and navigate around the UI to ensure the topology is intact
7) Run the drop_original_topology_object_tables.sql to remove the .bak tables created in step 3
NOTE: BE SURE YOU ARE AWARE OF WHAT TABLESPACE THE TABLES ARE BEING CREATED IN AS ERRORS IN THE SCRIPT MAY POINT TO THE TABLE BEING CREATED BUT IN THE WRONG TABLESPACE. A RECENT BACKUP OF THE FMS DATABASE IS RECOMMENDED PRIOR TO RUNNING ANY SCRIPTS DIRECTLY IN THE FMS DATABASE.