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 Operations 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 Operations Manager.

Why disk cleanup is needed

Operations 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 Operations Manager container file system can either be a Operations Manager stack or the result of pulling a Docker image.

For performance reasons, the Diego Cells cache the Docker image layers and the Operations Manager stacks used by running AIs. When Operations Manager destroys an AI or reschedules an AI to a different Diego Cell, certain Docker image layers or an old Operations Manager stack becomes unused. If Operations Manager does not clean these unused layers, the cell ephemeral disk slowly fills.

Options for disk cleanup

Operations 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.

Recommendations

To select the best option for disk cleanup, you must consider the workload that the Diego Cells run.

For Operations 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 Operations 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.

Calculating a reserve

By default, the space reserved for other jobs is set to a reasonable value for the majority of Operations 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.

For more information on disk usage and garbage collection in GrootFS, see GrootFS Disk Usage and Examining GrootFS Disk Usage.

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.

Configure disk cleanup scheduling

  1. Go to the Operations Manager Operations Manager Installation Dashboard.

  2. Click the VMware Tanzu Application Service for VMs tile, and navigate to App Containers.

  3. Under Diego Cell disk cleanup scheduling, select an option.

  4. 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.

  5. Click Save.

Next steps

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 Operations Manager Installation Dashboard, click Review Pending Changes, and click Apply Changes.

check-circle-line exclamation-circle-line close-line
Scroll to top icon