You can use quota plans in TAS for VMs, including creating and modifying quota plans for orgs and spaces.
Quota plans are named sets of memory, service, log rate, and instance usage quotas. For example, one quota plan might allow up to 10 services, 10 routes, 2 GB of RAM, and 2 KB of generated logs, while another might offer 100 services, 100 routes, 10 GB of RAM, and 16 KB of generated logs. Quota plans have user-friendly names, but are referenced in VMware Tanzu Application Service for VMs (TAS for VMs) internal systems by unique GUIDs.
Quota plans are not directly associated with user accounts. Instead, every org has a list of available quota plans, and the account admin assigns a specific quota plan from the list to the org. Everyone in the org shares the quotas described by the plan. There is no limit to the number of defined quota plans an account can have, but only one plan can be assigned at a time.
You must set a quota plan for an org, but you can choose whether to set a space quota. For more information, see the Orgs and Spaces sections of the Orgs, Spaces, Roles, and Permissions topic.
For information about managing network policy quotas, see Manage Network Policy Quotas in Configuring Container-to-Container Networking.
Name | Description | Valid Values | Example Value |
---|---|---|---|
name |
The name used identify the plan | A sequence of letters, digits, and underscore characters. Quota plan names within an account must be unique. | silver_quota |
memory_limit |
The maximum amount of memory usage allowed | An integer and a unit of measurement such as M, MB, G, or GB | 2048 M |
app_instance_limit |
The maximum number of app instances allowed. Stopped apps do not count toward this instance limit. Crashed apps count toward the limit, because their desired state is starting . |
An integer | 25 |
non_basic_services_allowed |
Determines whether users can provision instances of non-free service plans. Does not control plan visibility. When set to false , non-free service plans can be visible in the marketplace but instances cannot be provisioned. |
true or false |
true |
total_routes |
The maximum number of routes allowed. | An integer | 500 |
total_reserved_route_ports |
The maximum number of routes with reserved ports. | An integer not greater than total_routes |
60 |
total_services |
The maximum number of services allowed. | An integer | 25 |
trial_db_allowed |
This is a legacy field. Value can be ignored. | true or false |
true |
log_rate_limit |
The maximum number in bytes of logs allowed per second. | An integer and a unit of measurement such as K, KB, M, MB, G, or GB | 2048 M |
TAS for VMs installs with a quota plan named default
with the following values:
Memory limit: 10240 MB
Total routes: 1000
Total services: 100
Non-basic aervices allowed: true
Trial DB allowed: true
Log rate limit: unlimited
The org manager sets and manages quotas. For more information, see Orgs, Spaces, Roles, and Permissions.
You must create a quota plan for the org. To create a new quota plan for org, see Create a Quota Plan for an Org Through the cf CLI.
To create a new quota plan for an org through the cf CLI:
Run:
cf create-org-quota QUOTA-NAME -m TOTAL-MEMORY -i INSTANCE-MEMORY -l LOG-RATE-LIMIT -r NUMBER-OF-ROUTES -s NUMBER-OF-SERVICE-INSTANCES
Where:
QUOTA-NAME
is the name you want to give the quota plan.TOTAL-MEMORY
is the total amount of memory you want to allocate to all app instances in the org.INSTANCE-MEMORY
is the maximum amount of memory an app instance can use. Specify -1
to allow app instances to use an unlimited amount of memory.LOG-RATE-LIMIT
is the total number of logs per second you want to allow all app instances in the org to send to Loggregator.NUMBER-OF-ROUTES
is the total number of routes you want to allow all app instances in the org.NUMBER-OF-SERVICE-INSTANCES
is the total number of service instances you want to allow all app instances in the org.--allow-paid-service-plans
flag to allow the quota plan to provision instances of paid service plans.For example:
cf create-org-quota small -m 2048M -i 1024M -l 2K -r 10 -s 10 --allow-paid-service-plans
To modify an existing quota plan for an org through the cf CLI:
View all existing quota plans for your org by running:
cf org-quotas
This command returns output similar to the following example:
Getting org quotas as admin... name total memory instance memory routes service instances paid service plans app instances route ports log volume per second default 100G unlimited 1000 unlimited allowed unlimited 100 unlimited free 0 unlimited 1000 0 disallowed unlimited 0 4K paid 10M unlimited 1000 unlimited allowed unlimited 0 unlimited small 1G 1G 10 10 allowed unlimited 0 2K trial 2G 1G 1000 0 disallowed unlimited 0 1K
Record the name of the quota plan you want to modify.
Run:
cf update-org-quota QUOTA-NAME -n NEW-QUOTA-NAME -m TOTAL-MEMORY -i INSTANCE-MEMORY -r NUMBER-OF-ROUTES -s NUMBER-OF-SERVICE-INSTANCES
Where:
QUOTA-NAME
is the name of the quota plan you want to modify.NEW-QUOTA-NAME
is the new name you want to give the quota plan.TOTAL-MEMORY
is the total amount of memory you want to allocate to all app instances in the org.INSTANCE-MEMORY
is the maximum amount of memory an app instance can use. Specify -1
to allow app instances to use an unlimited amount of memory.LOG-RATE-LIMIT
is the total number of logs per second you want to allow all app instances in the org to send to Loggregator.NUMBER-OF-ROUTES
is the total number of routes you want to allow all app instances in the org.NUMBER-OF-SERVICE-INSTANCES
is the total number of service instances you want to allow all app instances in the org.--allow-paid-service-plans
flag. To prevent the quota plan from provisioning instances of paid service plans, include the --disallow-paid-service-plans
flag.For example:
cf update-org-quota small -n medium -m 4096M -i 2048M -l 8K -r 20 -s 20 --allow-paid-service-plans
To assign a quota plan to an org:
Run:
cf set-org-quota ORG QUOTA-NAME
Where:
ORG
is the name of the org to which you want to assign the quota plan.QUOTA-NAME
is the name of the quota plan you want to assign to the org.For each org, Org Managers create and modify quota plans for spaces in the org. If an Org Manager allocates a space quota, TAS for VMs verifies that resources do not exceed the allocated space limit. For example, when a Space Developer deploys an app, TAS for VMs first checks the memory allocation at the space level, then at the org level.
To create a quota plan for an individual space within an org, see Create a Quota Plan for a Space.
To modify a quota plan for an individual space within an org, see Modify a Quota Plan for a Space.
To create a quota plan for an individual space within an org:
Run:
cf create-space-quota QUOTA-NAME -m TOTAL-MEMORY -i INSTANCE-MEMORY -l LOG-RATE-LIMIT -r NUMBER-OF-ROUTES -s NUMBER-OF-SERVICE-INSTANCES
Where:
TOTAL-MEMORY
is the total amount of memory you want to allocate to all app instances in the space.INSTANCE-MEMORY
is the maximum amount of memory an app instance can use. Specify -1
to allow app instances to use an unlimited amount of memory.LOG-RATE-LIMIT
is the total number of logs per second you want to allow all app instances in the org to send to Loggregator.NUMBER-OF-ROUTES
is the total number of routes you want to allow all app instances in the space.NUMBER-OF-SERVICE-INSTANCES
is the total number of service instances you want to allow all app instances in the space.--allow-paid-service-plans
flag to allow the quota plan to provision instances of paid service plans.For example:
cf create-space-quota big -m 4096M -i 1024M -l 16K -r 20 -s 20 --allow-paid-service-plans
To modify a quota plan for an individual space within an org:
View all existing quota plans for all of the spaces in your org by running:
cf space-quotas
The above command returns output similar to the following example:
Getting space quotas for org example-org as admin... name total memory instance memory routes service instances paid service plans app instances route ports log volume per second big 4G 1G 20 20 allowed unlimited 0 16K trial 2G 1G 20 20 allowed unlimited 0 2K
Record the name of the quota plan you want to modify.
Run:
cf update-space-quota QUOTA-NAME -n NEW-QUOTA-NAME -m TOTAL-MEMORY -i INSTANCE-MEMORY -r NUMBER-OF-ROUTES -s NUMBER-OF-SERVICE-INSTANCES
Where:
QUOTA-NAME
is the name of the quota plan you want to modify.NEW-QUOTA-NAME
is the new name you want to give the quota plan.TOTAL-MEMORY
is the total amount of memory you want to allocate to all app instances in the space.INSTANCE-MEMORY
is the maximum amount of memory an app instance can use. Specify -1
to allow app instances to use an unlimited amount of memory.LOG-RATE-LIMIT
is the total number of logs per second you want to allow all app instances in the org to send to Loggregator.NUMBER-OF-ROUTES
is the total number of routes you want to allow all app instances in the space.NUMBER-OF-SERVICE-INSTANCES
is the total number of service instances you want to allow all app instances in the space.--allow-paid-service-plans
flag. To prevent the quota plan from provisioning instances of paid service plans, include the --disallow-paid-service-plans
flag. For example:
cf update-space-quota big -n bigger -m 4096M -i 20 -l 32K -r 20 -s 20 --allow-paid-service-plans
To assign a quota to a space, run the following command. Replace the placeholder attributes with the values for this quota plan:
To assign a quota plan to a space:
In a terminal window, run:
cf set-space-quota SPACE QUOTA-NAME
Where:
SPACE
is the name of the space to which you want to assign the quota plan.QUOTA-NAME
is the name of the quota plan you want to assign to the space.Important If you attempt to assign a quota plan with a log rate limit to a space containing apps that are already configured to send an unlimited number of logs to Loggregator, the command returns an error. To remedy this issue, see Configure Apps with Unlimited Log Rate Limits.
If you assign a quota plan with a log rate limit to a space containing apps that are already configured to send an unlimited number of logs to Loggregator, you see an error similar to the following example:
Setting space quota big to space example-space as admin... Current usage exceeds new quota values. The space(s) being assigned this quota contain apps running with an unlimited log rate limit. FAILED
Before you can assign a quota plan to the space, you must configure each app in the space with a log rate limit that is lower than the log rate limit specified in the quota plan.
To update the log rate limit for an app in the space to which you want to assign a quota plan:
Run:
cf scale -l LOG-RATE-LIMIT APP-NAME
Where:
LOG-RATE-LIMIT
is the log rate limit in bytes per second that you want to configure for the app.APP-NAME
is the name of the app for which you want to configure a log rate limit.After you have configured a log rate limit for each app in the space, follow the procedure in Assign a Quota Plan to a Space.
To view a list and brief description of all cf CLI commands related to space and org quotas:
Run:
cf help -a
In the terminal output, find the following commands:
... ORG ADMIN: org-quotas List available organization quotas org-quota Show organization quota set-org-quota Assign a quota to an organization create-org-quota Define a new quota for an organization delete-org-quota Delete an organization quota update-org-quota Update an existing organization quota share-private-domain Share a private domain with a specific org unshare-private-domain Unshare a private domain with a specific org SPACE ADMIN: space-quotas List available space quotas space-quota Show space quota info create-space-quota Define a new quota for a space update-space-quota Update an existing space quota delete-space-quota Delete a space quota set-space-quota Assign a quota to a space unset-space-quota Unassign a quota from a space