Apply resource suggestions
Guessing CPU and memory leads to apps that run out of memory or reserve capacity they never use. Orchard reads an app’s measured usage and suggests values that fit it, with a sentence that explains why. Nothing changes until you apply a suggestion.
Prerequisites
Section titled “Prerequisites”- Edit access to the project.
- At least three days of history for the app in the metrics store.
Apply a suggestion
Section titled “Apply a suggestion”- Open the app.
- Go to Settings > Resources.
- In CPU and memory, read the row that starts with Suggested. The row explains why Orchard suggests the change.
- Select Apply. This updates the form.
- Select Save. Saving restarts the app.
If the row does not appear, Orchard has no suggestion for the app.
How Orchard calculates a suggestion
Section titled “How Orchard calculates a suggestion”Orchard uses up to 14 days of history.
| Resource | Target | Minimum |
|---|---|---|
| Memory | 115% of the highest daily peak. | 128 MiB, or more for an image that needs it |
| CPU | The larger of 115% of the 99th percentile and 150% of the 95th percentile of usage. | 100m |
Orchard rounds each target up to the next resource preset or step.
Orchard also applies these rules:
- If the app ran out of memory, the suggestion raises memory by at least 20%, and by at least 100 MiB.
- If the app was throttled more than 10% of the time at the 95th percentile, Orchard treats the CPU limit as the bottleneck. Orchard does not suggest a lower CPU value.
- If the app restarted in the last 24 hours, Orchard does not suggest lower values.
- Orchard ignores changes under 25% of the current value.
- Orchard ignores memory changes under 128 MiB and CPU changes under 100m.
Orchard does not suggest values for an app that has no limits.
When you apply suggestions, you have an app sized to what it uses. To scale it out instead of up, refer to Scale an app and set resources.
Related resources
Section titled “Related resources”- Set quotas - Cap how much CPU and memory an organization and its members can use.
- Monitor an app - Read the usage graphs that suggestions are based on.
- Review usage - Compare what each project and app uses.