This article discusses how you can use quota plans in TAS for VMs, including creating and modifying quota plans for orgs and spaces.

Quota plans overview

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.

Org quota plan attributes

Name Description Valid Values Example Value
name The name you use to identify the plan A sequence of letters, digits, and underscore characters. Quota plan names within an account must be unique. silver_quota
memory_limit Maximum memory usage allowed An integer and a unit of measurement like M, MB, G, or GB 2048 M
app_instance_limit Maximum 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 false, non-free service plans may be visible in the marketplace but instances can not be provisioned. true or false true
total_routes Maximum routes allowed An integer 500
total_reserved_route_ports Maximum routes with reserved ports An integer not greater than total_routes 60
total_services Maximum services allowed An integer 25
trial_db_allowed Legacy Field. Value can be ignored. true or false true

Default quota plan for an org

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 Services Allowed: True

  • Trial DB Allowed: True

Create a new quota plan for an org

Note: The org manager sets and manages quotas. For more information, see Orgs, Spaces, Roles, and Permissions.

You must set an org quota. You can create a new quota plan for org with cf create-quota.

Use cf create-quota

In a terminal window, run the following command. Replace the placeholder attributes with the values for this quota plan:

cf create-quota QUOTA [-m TOTAL-MEMORY] [-i INSTANCE-MEMORY] [-r ROUTES] [-s SERVICE-INSTANCES] [--allow-paid-service-plans]

This command accepts the following flags:

  • -m: Total amount of memory
  • -i: Maximum amount of memory an application instance can have (-1 represents an unlimited amount)
  • -r: Total number of routes
  • -s: Total number of service instances
  • -allow-paid-service-plans: Can provision instances of paid service plans

Example:

$ cf create-quota small -m 2048M -i 1024M -r 10 -s 10 --allow-paid-service-plans

Modify an existing quota plan for an org

Use cf update-quota

  1. Find the names of all quota definitions available to your org by running the following command, and record the name of the quota plan to be modified:

    cf quotas
    

    For example:

    $ cf quotas
    Getting quotas as [email protected]...
    OK
    
    name           total memory limit   instance memory limit   routes       service instances   paid service plans
    free           0                    0                       1000         0                   disallowed
    paid           10G                  0                       1000        -1                   allowed
    small          2G                   0                         10        10                   allowed
    trial          2G                   0                       1000        10                   disallowed
    
  2. Run the following command, replacing QUOTA with the name of your quota:

    cf update-quota QUOTA [-i INSTANCE-MEMORY] [-m MEMORY] [-n NEW-NAME] [-r ROUTES] [-s SERVICE-INSTANCES] [--allow-paid-service-plans | --disallow-paid-service-plans]
    

    This command accepts the following flags:

    • -i: Maximum amount of memory an application instance can have (-1 represents an unlimited amount)
    • -m: Total amount of memory a space can have
    • -n: New name
    • -r: Total number of routes
    • -s: Total number of service instances
    • --allow-paid-service-plans: Can provision instances of paid service plans
    • --disallow-paid-service-plans: Can not provision instances of paid service plans

    For example:

     $ cf update-quota small -i 2048M -m 4096M -n medium -r 20 -s 20 --allow-paid-service-plans

Create and modify quota plans for a space

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.

Perform the following procedures to create and modify quota plans for individual spaces within an org.

Create a new quota plan for a space

In a terminal window, run the following command to create a quota for a space. Replace the placeholder attributes with the values for this quota plan:

cf create-space-quota QUOTA [-i INSTANCE-MEMORY] [-m MEMORY] [-r ROUTES] [-s SERVICE-INSTANCES] [--allow-paid-service-plans]

For example:

$ cf create-space-quota big -i 1024M -m 4096M -r 20 -s 20 --allow-paid-service-plans

Modify a quota plan for a space

To find the names of all space quota available to your org, run the following command and record the name of the quota plan to be modified:

cf space-quotas
$ cf space-quotas
Getting quotas as admin@example.com...
OK

name           total memory limit   instance memory limit   routes       service instances   paid service plans
big            2G                   unlimited               0            10                  allowed
trial          2G                   0                       0            10                  allowed

To modify that quota, run the following command. Replace the placeholder attributes with the values for this quota plan.

cf update-space-quota SPACE-QUOTA-NAME [-i MAX-INSTANCE-MEMORY] [-m MEMORY] [-n NEW-NAME] [-r ROUTES] [-s SERVICES] [--allow-paid-service-plans | --disallow-paid-service-plans]

For example:

$ cf update-space-quota big -i 20 -m 4096M -n bigger -r 20 -s 20 --allow-paid-service-plans

Run cf help

For more information regarding quotas, run cf help to view a list and brief description of all cf CLI commands. Scroll to view org and space quotas usage and information.

$ cf help
...
ORG ADMIN:
   quotas                                 List available usage quotas
   quota                                  Show quota info
   set-quota                              Assign a quota to an org

   create-quota                           Define a new resource quota
   delete-quota                           Delete a quota
   update-quota                           Update an existing resource quota

   share-private-domain                   Share a private domain with an org
   unshare-private-domain                 Unshare a private domain with an org

SPACE ADMIN:
   space-quotas                           List available space resource quotas
   space-quota                            Show space quota info
   create-space-quota                     Define a new space resource quota
   update-space-quota                     update an existing space quota
   delete-space-quota                     Delete a space quota definition and unassign the space quota from all spaces
   set-space-quota                        Assign a space quota definition to a space
   unset-space-quota                      Unassign a quota from a space

check-circle-line exclamation-circle-line close-line
Scroll to top icon