Disk cleanup is the process of removing unused layers from the Diego Cell disk. The disk cleanup process removes all unused Docker image layers and old Ops Manager stacks, regardless of their size or age.
To perform a detailed analysis of disk usage in your VMware Tanzu Application Service for VMs deployment, see Examining GrootFS Disk Usage.
This topic describes how to configure disk cleanup scheduling on Diego Cells in Ops Manager.
Ops Manager isolates app instances (AIs) from each other using containers that run inside Diego Cells. Containers enforce a set of isolation layers, including file system isolation. A Ops Manager container file system can either be a Ops Manager stack or the result of pulling a Docker image.
For performance reasons, the Diego Cells cache the Docker image layers and the Ops Manager stacks used by running AIs. When Ops Manager destroys an AI or reschedules an AI to a different Diego Cell, certain Docker image layers or an old Ops Manager stack becomes unused. If Ops Manager does not clean these unused layers, the cell ephemeral disk slowly fills.
Ops Manager provides the following options for scheduling the disk cleanup process on Diego Cells in the App Containers pane of the TAS for VMs tile:
Never clean up disk space: VMware does not recommend selecting this option for production environments.
Routinely clean up disk space: This option makes the Diego Cell schedule a disk cleanup whenever a container is created. Running the disk cleanup process this frequently can result in a negative impact on the Diego Cell performance.
Clean up disk space once usage fills disk: This option makes the Diego Cell schedule the disk cleanup process only when disk usage encroaches on the space reserved for other jobs.
For more information about these options, see Configure Disk Cleanup Scheduling.
To select the best option for disk cleanup, you must consider the workload that the Diego Cells run.
For Ops Manager installations that primarily run buildpack-based apps, VMware recommends selecting the Routinely clean up disk space option. The Routinely clean up disk space option ensures that when a new stack becomes available on a cell, the old stack is dropped immediately from the cache; that is, Diego Cells schedule a disk cleanup whenever a container is created.
For Ops Manager installations that primarily run Docker images, or both Docker images and buildpack-based apps, VMware recommends selecting the Clean up disk space once usage fills disk option.
By default, the space reserved for other jobs is set to a reasonable value for the majority of Ops Manager deployments. The reserve default value accounts for the most typical deployment case where the only other component that writes to
/var/vcap/data is the Diego executor cache.
However, if you are deploying any BOSH add-ons that require space in the ephemeral disk, you may need to increase the reserve.
Caution: Setting the reserve to an excessive value can cause garbage collection to occur more frequently. An increase in frequency can result in regular slowdowns in performance of apps on particular Diego Cells. VMware recommends leaving the default value for the reserve unless you are advised to modify it.
Go to the Ops Manager Operations Manager Installation Dashboard.
Click the VMware Tanzu Application Service for VMs tile, and navigate to App Containers.
Under Diego Cell disk cleanup scheduling, select an option.
If you select Clean up disk space once usage fills disk, you can modify the Reserved disk space for other jobs field. VMware recommends that you leave the default value of
15360 MB, or 15 GB, in Reserved disk space for other jobs unless you are instructed to change it. For more information, see Calculating a Reserve.
If you are configuring TAS for VMs for the first time, return to your specific IaaS configuration to continue the installation process.
If you are modifying an existing TAS for VMs installation, return to the Ops Manager Installation Dashboard, click Review Pending Changes, and click Apply Changes.