Overview
Sometimes you may want to lower your usage of the cache and workspaces in order to save money. Here are a few tips that can help you lower your costs.
Options
-
Review your workspace usage: Search for the
persit_to_workspace
command in your.circleci/config.yml
file to find all jobs utilizing workspaces. Determine if all items in the path are necessary. This can help you identify any unnecessary data being added to the workspace. - Set a low storage retention period: If you're only using workspaces to be able to re-run builds from fail, once the failing build passes, the workspace might not be needed. Setting a low storage period of, for example, one day, might be suitable for your projects. This will save costs by not keeping unnecessary data in storage.
- Customize storage usage: If you're on a paid plan, you can customize storage usage retention periods for workspaces on the CircleCI web app by navigating to Plan > Usage Controls.
Please note that each addition to the workspace creates a new layer in the workspace filesystem. Downstream jobs can then use this workspace for their own needs, or add more layers on top. For more detailed information, please refer to our optimization documentation found here.
Comments
Please sign in to leave a comment.