Scaling Db2 Big SQL

You can scale a Db2 Big SQL instance up or down by allocating additional or fewer resources.

About this task

Db2 Big SQL supports the following cluster sizes:

  • extra small
    Note: The extra small cluster size is for demo purposes only, not for production deployment.
  • small_mincpureq
  • small
  • medium
  • large
Tip: Detailed information about the sizes is available in the Component scaling guidance PDF document. The PDF is in the IBM Entitled Registry. For details, see Downloading the component scaling guidance PDF from the IBM Entitled Registry.

The following table provides suggested values that you can specify for each cluster size.

Cluster size CPU per pod Memory per pod
extra small

1 worker pod

4 32Gi
small_mincpureq

3 worker pods

5m 48Gi
small

3 worker pods

8 48Gi
medium

3 worker pods

16 96Gi
large

3 worker pods

32 192Gi

Except for the small_mincpureq size, you scale a Db2 Big SQL instance by editing the instance configuration in the IBM® Software Hub web client. You scale to and from the small_mincpureq size by entering CLI commands.

Best practice: You can run the commands in this task exactly as written if you set up environment variables. For instructions, see Setting up installation environment variables.

Ensure that you source the environment variables before you run the commands in this task.

Procedure

Steps to set the CPU size to the minimum required size

  1. In the IBM Software Hub web client, from the navigation menu, click Services > Instances.
  2. From the instances list, select the Db2 Big SQL instance that you want to modify.
  3. Click Edit.
  4. Scale Db2 Big SQL to the small size.
  5. Log in to Red Hat® OpenShift® Container Platform as an instance administrator.
    ${OC_LOGIN}
    Remember: OC_LOGIN is an alias for the oc login command.
  6. Identify the Db2 Big SQL instance ID:
    oc get cm -l component=db2bigsql -o custom-columns="Instance Id:{.data.instance_id},Instance Name:{.data.instance_name},Created:{.metadata.creationTimestamp}"
  7. Run the following command:
    oc -n ${PROJECT_CPD_INST_OPERANDS} patch sts c-c-bigsql-<bigsql_instance_id>-db2u --type='json' -p='[{"op":"replace", "path": "/spec/template/spec/containers/0/resources/limits/cpu", "value":"8"}, {"op":"replace", "path": "/spec/template/spec/containers/0/resources/requests/cpu", "value":"5m"}]'

Steps to scale Db2 Big SQL from the minimum reserved CPU size to another size

  1. If the Db2 Big SQL instance was originally scaled to the small size, run the following command:
    oc -n ${PROJECT_CPD_INST_OPERANDS} patch sts c-c-bigsql-<bigsql_instance_id>-db2u --type='json' -p='[{"op":"replace", "path": "/spec/template/spec/containers/0/resources/limits/cpu", "value":"8"}, {"op":"replace", "path": "/spec/template/spec/containers/0/resources/requests/cpu", "value":"8"}]'
  2. If the Db2 Big SQL instance was originally scaled to a size other than small, scale Db2 Big SQL to the size that you want in the IBM Software Hub web client.