Lowering Cache and Workspace Costs

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

  1. 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.
  2. 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.
  3. 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.

 

Additional Resources

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.