Controlling Resource Use

This topic tells operators how to control resource use, that is number and size of service instances used by MySQL for Pivotal Cloud Foundry (PCF) v2, by setting a maximum number of service instances and by only allowing certain orgs to use some service plans.

Example 1: Limit the Number of Service Instances

Resource costs have been increasing. Employees don’t delete their databases after tests. To stop employees wasting so many resources, you set quotas for the number of services instances that can exist at a time:

  • Set a global quota for the total number of service instances used by MySQL for PCF.
  • Set a per-plan quota for the service-plan with the most expensive service instances, that is, VM types.

Example 2: Limit Plan Access

You have a service plan called db-large which uses large service instances, and it’s in an expensive availability zone, too. You want this MySQL for PCF plan used only for your flagship production app. To prevent your development team from creating service instances in this plan, specify that only members of the production org can access the db-large plan.


MySQL for PCF v2 offers two types of quotas:

Global Quota

The global quota limits the total number of service instances that can be deployed by MySQL for PCF.

Configuring quotas allows you to limit the number of service instances that can be deployed, thereby ensuring that resource consumption stays within limits. By default, MySQL for PCF ships with a maximum limit of 50 service instances: this means that the MySQL for PCF service broker never deploys more than 50 service instances. You can set this quota to less than 50, but never to more than 50.

To configure a global quota, see Configure Global Quotas.

Service-Plan Quotas

A service-plan quota limits the number of service instances for one plan.

In the case where a service plan is configured to use a lot of resources, RAM or disk space, you might want to limit the number of service instances of this plan that can be configured. Setting a service plan quota on the more expensive plan ensures that resource consumption does not exceed an acceptable amount.

To configure a service-plan quota, see Configure Active Service Plans.

Control Access to Service Plan by Orgs

MySQL for PCF v2 allows you to control which CF orgs are able to access specific service plans. By default, active service plans are visible to all orgs. Controlling which orgs have access to a specific service plan allows you to ensure that the resource-intensive service plans are only available to the orgs that explicitly need them.

To configure MySQL for PCF v2 to control service-plan access, do the following:

  1. Set the Service Plan Access field to Manual on any active service plan.

    For more information, see Configure Active Service Plans.

  2. Click Save.

  3. Return to the Ops Manager Installation Dashboard and click Apply Changes.

  4. For each org that you want to use the service plan, do the following:

    1. Log in to the Cloud Foundry Command Line Interface (cf CLI) as an admin user:

      cf login

    2. Enable service access to the org:

      cf enable-service-access p.mysql -p PLAN -o ORGANIZATION


      PLAN: The name of the specific plan to enable, set to manual in step 1 above.

      ORGANIZATION: The name of the org that needs access to PLAN

      For example,

      $ cf enable-service-access p.mysql -o prodteam -p db-large
      Enabling access to plan db-large of service p.mysql for org prodteam as admin...

The org is now able to use the plan.

For information on modifying and viewing service-plan access, see Access Control.

Create a pull request or raise an issue on the source for this page in GitHub