From 10e9c31b6216c407ba1d9d94b81571f6b57c55bf Mon Sep 17 00:00:00 2001 From: Mark Boyd Date: Thu, 14 Dec 2023 15:29:52 -0500 Subject: [PATCH 01/10] add documentation on how memory quotas work --- _docs/orgs-spaces/limits.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/_docs/orgs-spaces/limits.md b/_docs/orgs-spaces/limits.md index 80d044e26..10248adda 100644 --- a/_docs/orgs-spaces/limits.md +++ b/_docs/orgs-spaces/limits.md @@ -7,6 +7,30 @@ title: Manage org quotas Org Managers are free to configure your org's [quota]({{ site.baseurl }}{% link _docs/pricing/quotas.md %}) capacity among your spaces and applications as you see fit. This enables Org Managers to limit usage and corresponding costs. +### How your memory quota works + +Every application instance or running task uses some amount of your organizaton's memory quota. The amount of memory used by your running tasks and applications must not exceed your memory quota. + +**Important caveat:** In order to stage existing or new applications, [CloudFoundry currently requires 1 GB of memory overhead by default](https://github.com/cloudfoundry/capi-release/blob/a172ff232ab6befdc8f9a55b17bd20cc1a3eeb40/jobs/cloud_controller_ng/spec#L913), so the **available memory for your running applications and tasks is actually your organization's memory quota minus 1 GB**. + +### Example + +As an example, if the `gov-agency` org has a memory quota of 4 GB and the following running applications/tasks: + +- 1 application instance using 1 GB in their `staging` space +- 2 application instances using **1 GB each** in their `prod` space + +Then they are currently using 3 GB out of their 4 GB memory quota. + +With only 1 GB of overhead remaining in the memory quota, developers in this org **could not**: + +- Increase the memory allocation for any of their applications +- Deploy a new application + +Developers in this org **could**: + +- Launch new [tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#run-tasks) using up to 1 GB of memory + ## Updating a quota To change your org quota, please have an Org Manager [send a quota change request email](mailto:inquiries@cloud.gov,support@cloud.gov?subject=Quota%20change%20request&body=Please%20update%20the%20quota%20for%20the%20following%20organization%3A%0A%0AOrg%20name%3A%20%0AMemory%3A%20%23GB%0AServices%3A%20%23%20or%20no%20change%0ARoutes%3A%20%23%20or%20no%20change"). This email link will pre-populate required information. @@ -25,7 +49,7 @@ To view your [org quota]({{ site.baseurl }}{% link _docs/pricing/quotas.md %}): You can use the following `cf` CLI plugins to help identify the right quota to set for your org. They are available from the _CF-Community_ plugin site: `cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org/` -- The [Usage Report plugin](https://github.com/krujos/usagereport-plugin) gives you a report of how your quota is used across visible organizations and spaces. To install: `cf install-plugin 'Usage Report' -r CF-Community` +- The [report-usgae plugin](https://github.com/aegershman/cf-report-usage-plugin) gives you a report of how your quota is used across visible organizations and spaces. To install: `cf install-plugin 'Usage Report' -r CF-Community` - The [Statistics plugin](https://github.com/swisscom/cf-statistics-plugin) gives you real-time visibility of the actual memory usage for each application instance compared to the memory limit. To install: `cf install-plugin Statistics -r CF-Community` From decb4eacbdd52b4d1e62c4708bb7729a8bbd28d2 Mon Sep 17 00:00:00 2001 From: Mark Boyd Date: Thu, 14 Dec 2023 15:30:08 -0500 Subject: [PATCH 02/10] add troubleshooting section on memory quota errors --- _docs/deployment/troubleshooting.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/_docs/deployment/troubleshooting.md b/_docs/deployment/troubleshooting.md index 90cf0206a..5083fe02a 100644 --- a/_docs/deployment/troubleshooting.md +++ b/_docs/deployment/troubleshooting.md @@ -3,7 +3,7 @@ parent: deployment layout: docs sidenav: true title: Troubleshooting -redirect_from: +redirect_from: - /docs/apps/troubleshooting/ linktitle: Troubleshooting weight: 100 @@ -71,3 +71,20 @@ Application start commands are cached during staging. Specifying a start command By default, applications must start within 60 seconds. This timeout can be extended to a maximum of 180 second via the `-t` command line switch or `timeout:` manifest key. Avoid placing long-running or multi-step tasks in the application start command. Consider using worker apps as part of a multi-application manifest instead. + +## Out of memory issues + +If you are getting errors like: + +- `Error: organization's memory limit exceeded` +- `ERR Failed to stage application: insufficient resources` + +Then you do not have enough memory left in your [organization's memory quota]({{ site.baseurl }}{% link _docs/orgs-spaces/limits.md %}#how-your-memory-quota-works) to run your tasks or applications. + +If you are experiencing these errors, then you can try: + +- Check the memory usage of your apps using `cf app ` to see if you can reduce the memory usage for any of your apps +- Delete any unused or unnecessary applications +- [Check to see if you have any running tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#list-tasks) using up memory that can be stopped + +If none of those options free, then you can contact [inquiries@cloud.gov]({{ site.inquiries_email }}) to request an increase to your organization's memory quota. From 37697219e7c6abf95cccaafa1be04f8d85f8f66f Mon Sep 17 00:00:00 2001 From: Mark Boyd Date: Thu, 14 Dec 2023 17:48:08 -0500 Subject: [PATCH 03/10] update documentation based on testing results --- _docs/deployment/troubleshooting.md | 8 +++++--- _docs/orgs-spaces/limits.md | 22 ++++++++++++++++------ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/_docs/deployment/troubleshooting.md b/_docs/deployment/troubleshooting.md index 5083fe02a..9b0da7b74 100644 --- a/_docs/deployment/troubleshooting.md +++ b/_docs/deployment/troubleshooting.md @@ -76,6 +76,8 @@ Avoid placing long-running or multi-step tasks in the application start command. If you are getting errors like: +- `organization's memory limit exceeded: staging requires 1024M memory` +- `memory_in_mb exceeds organization memory quota` - `Error: organization's memory limit exceeded` - `ERR Failed to stage application: insufficient resources` @@ -83,8 +85,8 @@ Then you do not have enough memory left in your [organization's memory quota]({{ If you are experiencing these errors, then you can try: -- Check the memory usage of your apps using `cf app ` to see if you can reduce the memory usage for any of your apps +- Check the memory usage of your apps using `cf app ` to see if you can reduce the memory allocation for any of your apps - Delete any unused or unnecessary applications -- [Check to see if you have any running tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#list-tasks) using up memory that can be stopped +- [Check to see if you have any running tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#list-tasks) using up memory that can be [canceled](https://docs.cloudfoundry.org/devguide/using-tasks.html#cancel-task) -If none of those options free, then you can contact [inquiries@cloud.gov]({{ site.inquiries_email }}) to request an increase to your organization's memory quota. +If none of those options free up enough memory to resolve the errors, then you can contact [inquiries@cloud.gov]({{ site.inquiries_email }}) to request an increase to your organization's memory quota. diff --git a/_docs/orgs-spaces/limits.md b/_docs/orgs-spaces/limits.md index 10248adda..ae55f9def 100644 --- a/_docs/orgs-spaces/limits.md +++ b/_docs/orgs-spaces/limits.md @@ -9,9 +9,11 @@ Org Managers are free to configure your org's [quota]({{ site.baseurl }}{% link ### How your memory quota works -Every application instance or running task uses some amount of your organizaton's memory quota. The amount of memory used by your running tasks and applications must not exceed your memory quota. +Every application instance or running task uses some amount of your organizaton's memory quota. The amount of memory used by your running tasks and started applications must not exceed your memory quota. -**Important caveat:** In order to stage existing or new applications, [CloudFoundry currently requires 1 GB of memory overhead by default](https://github.com/cloudfoundry/capi-release/blob/a172ff232ab6befdc8f9a55b17bd20cc1a3eeb40/jobs/cloud_controller_ng/spec#L913), so the **available memory for your running applications and tasks is actually your organization's memory quota minus 1 GB**. +### Memory overhead for staging applications + +In order to stage existing or new applications, [CloudFoundry currently requires 1 GB of memory overhead by default](https://github.com/cloudfoundry/capi-release/blob/a172ff232ab6befdc8f9a55b17bd20cc1a3eeb40/jobs/cloud_controller_ng/spec#L913), meaning you ### Example @@ -20,16 +22,24 @@ As an example, if the `gov-agency` org has a memory quota of 4 GB and the follow - 1 application instance using 1 GB in their `staging` space - 2 application instances using **1 GB each** in their `prod` space -Then they are currently using 3 GB out of their 4 GB memory quota. +Then they are currently using 3 GB out of their 4 GB memory quota: + +```text +(1 GB * 1 instance) + (1 GB * 2 instances) = 3 GB +``` -With only 1 GB of overhead remaining in the memory quota, developers in this org **could not**: +Since 1 GB of memory overhead is required when deploying or redeploying applications, + +developers in this org **could not**: - Increase the memory allocation for any of their applications - Deploy a new application -Developers in this org **could**: +None of those options would work because the remaining 1 GB of memory is reserved for staging applications. + +However, developers in this org **could**: -- Launch new [tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#run-tasks) using up to 1 GB of memory +- Launch new [tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#run-tasks) using up to 1 GB of memory. Launching tasks on existing applications does not require staging those applications, thus the [memory overhead for application staging is not necessary](#memory-overhead-for-staging-applications). ## Updating a quota From 8581f64cad1cf1abeadd579b1d4a654272d3cbfc Mon Sep 17 00:00:00 2001 From: Mark Boyd Date: Fri, 15 Dec 2023 14:55:28 -0500 Subject: [PATCH 04/10] update documentation based on memory quota testing --- _docs/deployment/troubleshooting.md | 2 +- _docs/orgs-spaces/limits.md | 42 ++++++++++++++++++++--------- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/_docs/deployment/troubleshooting.md b/_docs/deployment/troubleshooting.md index 9b0da7b74..dc02f9a94 100644 --- a/_docs/deployment/troubleshooting.md +++ b/_docs/deployment/troubleshooting.md @@ -85,7 +85,7 @@ Then you do not have enough memory left in your [organization's memory quota]({{ If you are experiencing these errors, then you can try: -- Check the memory usage of your apps using `cf app ` to see if you can reduce the memory allocation for any of your apps +- Check the memory usage of your apps using `cf app ` or using the [recommended plugins](({{ site.baseurl }}{% link _docs/orgs-spaces/limits.md %}#tracking-quota-usage) to see if you can reduce the memory allocation for any of your apps - Delete any unused or unnecessary applications - [Check to see if you have any running tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#list-tasks) using up memory that can be [canceled](https://docs.cloudfoundry.org/devguide/using-tasks.html#cancel-task) diff --git a/_docs/orgs-spaces/limits.md b/_docs/orgs-spaces/limits.md index ae55f9def..081df604f 100644 --- a/_docs/orgs-spaces/limits.md +++ b/_docs/orgs-spaces/limits.md @@ -13,7 +13,12 @@ Every application instance or running task uses some amount of your organizaton' ### Memory overhead for staging applications -In order to stage existing or new applications, [CloudFoundry currently requires 1 GB of memory overhead by default](https://github.com/cloudfoundry/capi-release/blob/a172ff232ab6befdc8f9a55b17bd20cc1a3eeb40/jobs/cloud_controller_ng/spec#L913), meaning you +In order to stage new applications or to update an existing application's memory, you must have **as much memory left in your quota as the total amount of memory that you are trying to stage**. + +So for example: + +- If you want to stage an application with **2 GB** of memory, you must have **2 GB** of memory left in your memory quota +- If you want to stage an application with **2 instances each using 1 GB** of memory, you must have **2 GB** of memory left in your memory quota ### Example @@ -28,18 +33,18 @@ Then they are currently using 3 GB out of their 4 GB memory quota: (1 GB * 1 instance) + (1 GB * 2 instances) = 3 GB ``` -Since 1 GB of memory overhead is required when deploying or redeploying applications, - -developers in this org **could not**: - -- Increase the memory allocation for any of their applications -- Deploy a new application +Developers in this org **could not**: -None of those options would work because the remaining 1 GB of memory is reserved for staging applications. +- Deploy a new application with more 1 GB of memory +- Add any application instances for their running applications -However, developers in this org **could**: +Developers in this org **could**: -- Launch new [tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#run-tasks) using up to 1 GB of memory. Launching tasks on existing applications does not require staging those applications, thus the [memory overhead for application staging is not necessary](#memory-overhead-for-staging-applications). +- Launch new [tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#run-tasks) using up to 1 GB of total memory. Launching tasks on existing applications does not require staging those applications, thus the [memory overhead for application staging is not necessary](#memory-overhead-for-staging-applications). +- Deploy application(s) using less than or equal to 1 GB of memory for the total number of instances, for example: + - 1 application instance using 1 GB of memory or less + - 2 application instances each using 512 MB of memory or less + - 4 application instances each using 256 MB of memory or less ## Updating a quota @@ -57,10 +62,21 @@ To view your [org quota]({{ site.baseurl }}{% link _docs/pricing/quotas.md %}): ### Tracking quota usage -You can use the following `cf` CLI plugins to help identify the right quota to set for your org. They are available from the _CF-Community_ plugin site: `cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org/` +You can use the following `cf` CLI plugins to help identify the right quota to set for your org. + +- The [report-usage plugin](https://github.com/aegershman/cf-report-usage-plugin) gives you a report of how your quota is used across visible organizations and spaces. See the [plugin README for installation instructions](https://github.com/aegershman/cf-report-usage-plugin?tab=readme-ov-file#installation). + +- The [Statistics plugin](https://github.com/swisscom/cf-statistics-plugin) gives you real-time visibility of the actual memory usage for each application instance compared to the memory limit. To install: + 1. Add the _CF-Community_ plugin site: + + ```shell + cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org/ + ``` -- The [report-usgae plugin](https://github.com/aegershman/cf-report-usage-plugin) gives you a report of how your quota is used across visible organizations and spaces. To install: `cf install-plugin 'Usage Report' -r CF-Community` + 1. Install -- The [Statistics plugin](https://github.com/swisscom/cf-statistics-plugin) gives you real-time visibility of the actual memory usage for each application instance compared to the memory limit. To install: `cf install-plugin Statistics -r CF-Community` + ```shell + cf install-plugin Statistics -r CF-Community + ``` You can use these two in combination to get a good sense of where you can lower instance memory limits to make room for more instances elsewhere in your org or just reduce your quota to reduce costs. From a894e41105b815e354af12d145b160400c2554d1 Mon Sep 17 00:00:00 2001 From: Mark Boyd Date: Fri, 15 Dec 2023 16:52:18 -0500 Subject: [PATCH 05/10] revise documentation based on more testing --- _docs/orgs-spaces/limits.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/_docs/orgs-spaces/limits.md b/_docs/orgs-spaces/limits.md index 081df604f..b4f8f160d 100644 --- a/_docs/orgs-spaces/limits.md +++ b/_docs/orgs-spaces/limits.md @@ -13,12 +13,19 @@ Every application instance or running task uses some amount of your organizaton' ### Memory overhead for staging applications -In order to stage new applications or to update an existing application's memory, you must have **as much memory left in your quota as the total amount of memory that you are trying to stage**. +In order to stage applications using 1 GB or more memory per application instance, **you must have as much memory left in your quota as the memory used by each instance**. + +If you are trying to stage an application using less than 1 GB of memory per application instance, [**then the check for available memory in your quota will be bypassed**](https://github.com/cloudfoundry/cloud_controller_ng/blob/9941def05eca25e732c4a73ac709e05215e056f5/lib/cloud_controller/backends/quota_validating_staging_memory_calculator.rb#L10) and staging should always succeed. So for example: -- If you want to stage an application with **2 GB** of memory, you must have **2 GB** of memory left in your memory quota -- If you want to stage an application with **2 instances each using 1 GB** of memory, you must have **2 GB** of memory left in your memory quota +- If you want to stage an application with **a single instance using 2 GB of memory**, you must have at least **2 GB** of memory left in your memory quota +- If you want to stage an application with **2 instances each using 1 GB of memory**, you must have at leaset **1 GB** of memory left in your memory quota +- If you want to stage an application with anything **less than 1 GB of memory per instance**, staging should always succeed + +Even if staging for an application succeeds, **the total amount of memory used by all application instance(s) still cannot exceed the memory quota otherwise deployment will fail**. + +> **Please note:** [This 1 GB threshold for checking the memory quota when staging applications is based on current CloudFoundry configuration](https://github.com/cloudfoundry/capi-release/blob/a172ff232ab6befdc8f9a55b17bd20cc1a3eeb40/jobs/cloud_controller_ng/spec#L913) and is subject to change. ### Example @@ -35,16 +42,17 @@ Then they are currently using 3 GB out of their 4 GB memory quota: Developers in this org **could not**: -- Deploy a new application with more 1 GB of memory -- Add any application instances for their running applications +- Deploy a new application with greater than or equal to 1 GB of memory per instance, since that operation would [exceed the minimum amount of memory required for staging applications](#memory-overhead-for-staging-applications) and the total memory in the quota +- Add any application instances for their applications Developers in this org **could**: -- Launch new [tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#run-tasks) using up to 1 GB of total memory. Launching tasks on existing applications does not require staging those applications, thus the [memory overhead for application staging is not necessary](#memory-overhead-for-staging-applications). -- Deploy application(s) using less than or equal to 1 GB of memory for the total number of instances, for example: - - 1 application instance using 1 GB of memory or less - - 2 application instances each using 512 MB of memory or less - - 4 application instances each using 256 MB of memory or less +- Launch new [tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#run-tasks) using up to 1 GB of total memory. Launching tasks on existing applications does not require staging those applications, thus the memory overhead for application staging is not necessary. +- Deploy application(s) using less than or equal to 1 GB of memory per instance without exceeding the remaining 1 GB of the memory quota, such as: + - 1 application instances each using 1 GB of memory + - The initial deployment of this application would succeed, but subsequent re-pushes or restaging would fail since there would no longer be sufficient memory overhead to stage the application + - 2 application instances each using 512 MB of memory + - 4 application instances each using 256 MB of memory ## Updating a quota From f1a7f7c4f36578bd1bdae28da672f370bb6b2cfc Mon Sep 17 00:00:00 2001 From: Mark Boyd Date: Fri, 15 Dec 2023 17:08:30 -0500 Subject: [PATCH 06/10] finalize documentation --- _docs/deployment/troubleshooting.md | 2 +- _docs/orgs-spaces/limits.md | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/_docs/deployment/troubleshooting.md b/_docs/deployment/troubleshooting.md index dc02f9a94..2aa7f4dbb 100644 --- a/_docs/deployment/troubleshooting.md +++ b/_docs/deployment/troubleshooting.md @@ -85,7 +85,7 @@ Then you do not have enough memory left in your [organization's memory quota]({{ If you are experiencing these errors, then you can try: -- Check the memory usage of your apps using `cf app ` or using the [recommended plugins](({{ site.baseurl }}{% link _docs/orgs-spaces/limits.md %}#tracking-quota-usage) to see if you can reduce the memory allocation for any of your apps +- Check the memory usage of your apps using `cf app ` or using the [recommended plugins]({{ site.baseurl }}{% link _docs/orgs-spaces/limits.md %}#tracking-quota-usage) to see if you can reduce the memory allocation for any of your applications - Delete any unused or unnecessary applications - [Check to see if you have any running tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#list-tasks) using up memory that can be [canceled](https://docs.cloudfoundry.org/devguide/using-tasks.html#cancel-task) diff --git a/_docs/orgs-spaces/limits.md b/_docs/orgs-spaces/limits.md index b4f8f160d..dcb462907 100644 --- a/_docs/orgs-spaces/limits.md +++ b/_docs/orgs-spaces/limits.md @@ -20,7 +20,7 @@ If you are trying to stage an application using less than 1 GB of memory per app So for example: - If you want to stage an application with **a single instance using 2 GB of memory**, you must have at least **2 GB** of memory left in your memory quota -- If you want to stage an application with **2 instances each using 1 GB of memory**, you must have at leaset **1 GB** of memory left in your memory quota +- If you want to stage an application with **2 instances each using 1 GB of memory**, you must have at least **1 GB** of memory left in your memory quota - If you want to stage an application with anything **less than 1 GB of memory per instance**, staging should always succeed Even if staging for an application succeeds, **the total amount of memory used by all application instance(s) still cannot exceed the memory quota otherwise deployment will fail**. @@ -42,15 +42,16 @@ Then they are currently using 3 GB out of their 4 GB memory quota: Developers in this org **could not**: -- Deploy a new application with greater than or equal to 1 GB of memory per instance, since that operation would [exceed the minimum amount of memory required for staging applications](#memory-overhead-for-staging-applications) and the total memory in the quota -- Add any application instances for their applications +- Deploy a new application with greater than 1 GB of memory per instance, since that operation would exceed the total memory in the quota +- Add an instance using [`instances` in the app manifest](https://docs.cloudfoundry.org/devguide/deploy-apps/manifest-attributes.html#instances) and deploy via [`cf push`](https://cli.cloudfoundry.org/en-US/v7/push.html) for either application. Though the application would instantly scale to the desired number of instances, using up all of the memory quota, it would fail when trying restage the app because there would any memory left for staging Developers in this org **could**: - Launch new [tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#run-tasks) using up to 1 GB of total memory. Launching tasks on existing applications does not require staging those applications, thus the memory overhead for application staging is not necessary. +- Scale either of their existing applications using [`cf scale`](https://cli.cloudfoundry.org/en-US/v7/scale.html) to have 1 additional instance - Deploy application(s) using less than or equal to 1 GB of memory per instance without exceeding the remaining 1 GB of the memory quota, such as: - 1 application instances each using 1 GB of memory - - The initial deployment of this application would succeed, but subsequent re-pushes or restaging would fail since there would no longer be sufficient memory overhead to stage the application + - The initial deployment of this application would succeed, but subsequent re-pushes or restaging of any application would fail since there would no longer be sufficient memory overhead to stage any application - 2 application instances each using 512 MB of memory - 4 application instances each using 256 MB of memory From 6703412e87128ef8cc3d9df7e617aed8ec8aabbb Mon Sep 17 00:00:00 2001 From: Mark Boyd Date: Fri, 15 Dec 2023 17:12:48 -0500 Subject: [PATCH 07/10] update heading levels --- _docs/orgs-spaces/limits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_docs/orgs-spaces/limits.md b/_docs/orgs-spaces/limits.md index dcb462907..402a4f1b1 100644 --- a/_docs/orgs-spaces/limits.md +++ b/_docs/orgs-spaces/limits.md @@ -7,7 +7,7 @@ title: Manage org quotas Org Managers are free to configure your org's [quota]({{ site.baseurl }}{% link _docs/pricing/quotas.md %}) capacity among your spaces and applications as you see fit. This enables Org Managers to limit usage and corresponding costs. -### How your memory quota works +## How your memory quota works Every application instance or running task uses some amount of your organizaton's memory quota. The amount of memory used by your running tasks and started applications must not exceed your memory quota. From 352b67a0e2b446e5b39148370ab094d44d88f062 Mon Sep 17 00:00:00 2001 From: Mark Boyd Date: Fri, 15 Dec 2023 17:13:58 -0500 Subject: [PATCH 08/10] minor edits --- _docs/orgs-spaces/limits.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_docs/orgs-spaces/limits.md b/_docs/orgs-spaces/limits.md index 402a4f1b1..6858e3d02 100644 --- a/_docs/orgs-spaces/limits.md +++ b/_docs/orgs-spaces/limits.md @@ -32,7 +32,7 @@ Even if staging for an application succeeds, **the total amount of memory used b As an example, if the `gov-agency` org has a memory quota of 4 GB and the following running applications/tasks: - 1 application instance using 1 GB in their `staging` space -- 2 application instances using **1 GB each** in their `prod` space +- 2 application instances using 1 GB each in their `prod` space Then they are currently using 3 GB out of their 4 GB memory quota: @@ -50,7 +50,7 @@ Developers in this org **could**: - Launch new [tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#run-tasks) using up to 1 GB of total memory. Launching tasks on existing applications does not require staging those applications, thus the memory overhead for application staging is not necessary. - Scale either of their existing applications using [`cf scale`](https://cli.cloudfoundry.org/en-US/v7/scale.html) to have 1 additional instance - Deploy application(s) using less than or equal to 1 GB of memory per instance without exceeding the remaining 1 GB of the memory quota, such as: - - 1 application instances each using 1 GB of memory + - 1 application instance using 1 GB of memory - The initial deployment of this application would succeed, but subsequent re-pushes or restaging of any application would fail since there would no longer be sufficient memory overhead to stage any application - 2 application instances each using 512 MB of memory - 4 application instances each using 256 MB of memory From 25a4c2b715aff8d65447e4a0bac98482fa7fd952 Mon Sep 17 00:00:00 2001 From: Mark Boyd Date: Fri, 15 Dec 2023 17:18:53 -0500 Subject: [PATCH 09/10] add example of how to use plugin for memory usage --- _docs/orgs-spaces/limits.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/_docs/orgs-spaces/limits.md b/_docs/orgs-spaces/limits.md index 6858e3d02..594969141 100644 --- a/_docs/orgs-spaces/limits.md +++ b/_docs/orgs-spaces/limits.md @@ -47,7 +47,7 @@ Developers in this org **could not**: Developers in this org **could**: -- Launch new [tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#run-tasks) using up to 1 GB of total memory. Launching tasks on existing applications does not require staging those applications, thus the memory overhead for application staging is not necessary. +- [Launch new tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#run-tasks) using up to 1 GB of total memory. Launching tasks on existing applications does not require staging those applications, thus the memory overhead for application staging is not necessary. - Scale either of their existing applications using [`cf scale`](https://cli.cloudfoundry.org/en-US/v7/scale.html) to have 1 additional instance - Deploy application(s) using less than or equal to 1 GB of memory per instance without exceeding the remaining 1 GB of the memory quota, such as: - 1 application instance using 1 GB of memory @@ -73,13 +73,18 @@ To view your [org quota]({{ site.baseurl }}{% link _docs/pricing/quotas.md %}): You can use the following `cf` CLI plugins to help identify the right quota to set for your org. -- The [report-usage plugin](https://github.com/aegershman/cf-report-usage-plugin) gives you a report of how your quota is used across visible organizations and spaces. See the [plugin README for installation instructions](https://github.com/aegershman/cf-report-usage-plugin?tab=readme-ov-file#installation). +- The [report-usage plugin](https://github.com/aegershman/cf-report-usage-plugin) gives you a report of how your quota is used across visible organizations and spaces. See the [plugin README for installation instructions](https://github.com/aegershman/cf-report-usage-plugin?tab=readme-ov-file#installation). The plugin can be invoked like so to give a summary of memory usage for an organization: + + ```shell + cf report-usage -o --format string + ``` - The [Statistics plugin](https://github.com/swisscom/cf-statistics-plugin) gives you real-time visibility of the actual memory usage for each application instance compared to the memory limit. To install: 1. Add the _CF-Community_ plugin site: ```shell - cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org/ + cf add-plugin-repo CF-Community \ + https://plugins.cloudfoundry.org/ ``` 1. Install From be50cb33188bc81897921258e6b542fdeba5b53f Mon Sep 17 00:00:00 2001 From: Mark Boyd Date: Fri, 15 Dec 2023 17:20:31 -0500 Subject: [PATCH 10/10] add links to section on memory overhead for staging --- _docs/orgs-spaces/limits.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_docs/orgs-spaces/limits.md b/_docs/orgs-spaces/limits.md index 594969141..90205f679 100644 --- a/_docs/orgs-spaces/limits.md +++ b/_docs/orgs-spaces/limits.md @@ -47,11 +47,11 @@ Developers in this org **could not**: Developers in this org **could**: -- [Launch new tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#run-tasks) using up to 1 GB of total memory. Launching tasks on existing applications does not require staging those applications, thus the memory overhead for application staging is not necessary. +- [Launch new tasks](https://docs.cloudfoundry.org/devguide/using-tasks.html#run-tasks) using up to 1 GB of total memory. Launching tasks on existing applications does not require staging those applications, thus the [memory overhead for application staging is not necessary](#memory-overhead-for-staging-applications). - Scale either of their existing applications using [`cf scale`](https://cli.cloudfoundry.org/en-US/v7/scale.html) to have 1 additional instance - Deploy application(s) using less than or equal to 1 GB of memory per instance without exceeding the remaining 1 GB of the memory quota, such as: - 1 application instance using 1 GB of memory - - The initial deployment of this application would succeed, but subsequent re-pushes or restaging of any application would fail since there would no longer be sufficient memory overhead to stage any application + - The initial deployment of this application would succeed, but subsequent re-pushes or restaging of any application would fail since there would no longer be [sufficient memory overhead to stage any application](#memory-overhead-for-staging-applications) - 2 application instances each using 512 MB of memory - 4 application instances each using 256 MB of memory