datomic_kvs table is too large

Document ID : KB000007087
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:
  • The Unified Infrastructure Mangement (UIM) DB has grown large and is continuing to grow at an excessive rate
  • Most of the space seems to be occupied by the datomic_kvs table
Cause:

The datomic_kvs table was introduced with the udm_manager probe in UIM 8.1 and holds the information about the udm data-store (device and topology information / history) .

Datomic peers use this data-store to retrieve information and include the discovery_server, UGS and USM. Since 8.4 the functionality of the UGS has been taken over by the trellis probe, and the use of the datomic_kvs table has been optimized. 

So it is expected that the table will grow, but abnormally large growth of this table can indeed cause issues. A large table could also be an artifact from a previous version of UIM where the management of this table was not yet optimized. 

Resolution:

please do the following steps to clear the data: 

  1. Stop the data_engine, udm_manager and trellis probes. 
  2. Go to the Database run these queries .. 

    • Select * into bkup_datomic_kvs from datomic_kvs 

      This query is meant to create a backup of the datomic_kvs table. We always recommend this as a best-practice. However, if you don't have enough space, we can skip this step. datomic_kvs table gets repopulated by the trellis probe, so, there should be no problem if you truncate the table 

    • truncate table datomic_kvs 

      This query will truncate the datomic_kvs table, meaning it will remove all the data from this table

  3. start Data_engine, UDM and trellis probes 

    The table information will be recreated, so there should not be any fear of data loss