Guest alfredodeza Posted January 10, 2023 Posted January 10, 2023 As a developer, you're likely familiar with the concept of "quotas" when it comes to using cloud-based services. These limits are put in place to ensure that resources are used efficiently and to prevent any one user from consuming too many resources. In this post, we'll take a look at how quotas are affected by Codespaces and provide some suggestions for avoiding the limits on free Codespaces. Before getting into the suggestions, it's important to recognize two key features of how Codespaces effect quotas: Every Codespace that has been created (but not deleted) has the potential to deplete your included quota. Running Codespaces will use both CPU core-hours and storage, while stopped Codespaces will consume your storage quota only. It can be tricky to figure out exactly how your Codespaces are consuming your monthly quotas, but here are four good tips for lowering your spending on your personal account: 1. Delete Codespaces aggressively You can conserve quotas by deleting Codespaces instances after each use. Additionally, under the Codespaces settings page, try lowering the default retention time to 1 day (the default is 30 days). This will help guarantee that you only consume resources when they are truly required. 2. Don't enable pre-builds Pre-builds consume storage, so it's important to be mindful of what pre-builds you have enabled. Unfortunately, it can be difficult to keep track of which pre-builds you have enabled, so it's best to avoid them entirely. 3. Monitor usage closely To keep track of your Codespaces use, use the Billing Settings to check your usage and ensure you're not wasting capacity. This might help you identify any unnecessary usage and taking steps to reduce it. 4. Use granular reporting Finally, for granular reporting and debugging consumption on CPU, Storage, and Pre-builds, use the “Get usage report” button in the billing page next to the “Usage this month” section. This will generate a CSV report, which will be delivered to your account and will provide you with specific information on your usage as well as assist you in identifying areas for improvement. Overall, quotas can be a tricky thing to navigate when it comes to Codespaces, but by following these tips and regularly monitoring your consumption, you'll be well on your way to avoiding free Codespace limits and keeping your costs low. Want to learn more about Codespaces? Here are some useful resources: Watch the complete Video Series on GitHub Codespaces Explore the Python template for hands-on examples Use the JavaScript template to try out a hands-on project Continue reading... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.