Configuring Cell Disk Cleanup Scheduling
Page last updated:
This topic describes how to configure disk cleanup scheduling on Diego Cells in Pivotal Platform.
Pivotal Platform 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 Pivotal Platform container file system can either be a Pivotal Platform stack or the result of pulling a Docker image.
For performance reasons, the Diego Cells cache the Docker image layers and the Pivotal Platform stacks used by running AIs. When Pivotal Platform destroys an AI or reschedules an AI to a different Diego Cell, a chance exist that certain Docker image layers or an old Pivotal Platform stack becomes unused. If Pivotal Platform does not clean these unused layers, the cell ephemeral disk slowly fills.
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 Pivotal Platform Stacks, regardless of their size or age.
To perform a detailed analysis of disk usage in your Pivotal Application Service (PAS) deployment, see Examining GrootFS Disk Usage.
Pivotal Platform provides the following options for scheduling the disk cleanup process on Diego Cells in the App Containers pane of the PAS tile:
Never clean up Diego Cell disk space: Pivotal does not recommend selecting this option for production environments.
Routinely clean up Diego Cell 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 Pivotal Platform installations that primarily run buildpack-based apps, Pivotal recommends selecting the Routinely clean up Diego Cell disk space option. The Routinely clean up Diego Cell disk space option ensures that when a new stack becomes available on a cell, the old stack is dropped immediately from the cache.
For Pivotal Platform installations that primarily run Docker images, or both Docker images and buildpack-based apps, Pivotal 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 Pivotal Platform 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.
Warning: 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. Pivotal recommends leaving the default value for the reserve unless you are advised to modify it.
Navigate to the Pivotal Platform Ops Manager Installation Dashboard.
Click the Pivotal Application Service (PAS) tile, and navigate to App Containers.
Under Docker images disk cleanup scheduling on Diego Cell VMs, 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. Pivotal recommends that you leave the default value of
15360MB, 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 PAS for the first time, return to your specific IaaS configuration to continue the installation process.
If you are modifying an existing PAS installation, return to the Ops Manager Installation Dashboard, click Review Pending Changes, and click Apply Changes.