Cleanup historical manifests from LCM database to reduce memory consumption
search cancel

Cleanup historical manifests from LCM database to reduce memory consumption

book

Article ID: 327217

calendar_today

Updated On:

Products

VMware Cloud Foundation

Issue/Introduction

As VCF releases the manifest for every release, customers are recommended to download the latest manifest in order to keep their LCM system state up to date, like the release view page in the SDDC Manager UI and other bundle availability computations. When the customer by hand or by LCM auto-polling the depot, downloads the latest manifest, it stores it into the LCM database. This file, while not large, does grows in size every time as a new release is added, and today every copy is stored in the database. To reduce any manifest related computation time on LCM, it is advised that customers remove any manifests that are not the latest.

Symptoms:
UI is slow to load release view page. LCM restart may take longer than 2-3 minutes to load.

Environment

VMware Cloud Foundation 4.4.x
VMware Cloud Foundation 4.3.x
VMware Cloud Foundation 4.1
VMware Cloud Foundation 4.2.x
Vmware Cloud Foundation 4.5

Cause

To keep historical context in case a user needs to revert their latest manifest download, it was decided to maintain all copies in the database.

Resolution

Currently there is no resolution. The issue will be fixed in future VCF release.

Workaround:

Remove old manifest files from the LCM Database on the SDDC Manager. 
1. SSH into the SDDC Manager and elevate to root.
2.Run the following command to remove old manifest files.

psql -h localhost -U postgres -d lcm -c "DELETE from manifest WHERE sequence_number < (SELECT MAX(sequence_number) FROM manifest)"


Example output:

root@sddc-manager [ /home/vcf ]# psql -h localhost -U postgres -d lcm -c "DELETE from manifest WHERE sequence_number < (SELECT MAX(sequence_number) FROM manifest)"
DELETE 6