Scaling Data Virtualization

You can scale an instance of Data Virtualization on Cloud Pak for Data to increase processing capacity. You can manually or automatically scale your Data Virtualization instance resources by using standard t-shirt sizes, or you can use custom sizes.

Standard t-shirt sizing

Data Virtualization supports the following standard t-shirt cluster sizes:
  • extrasmall (Default size after Data Virtualization instance is provisioned.)
  • small_mincpureq (Pod settings are optimized so that minimal resources are reserved on your clusters.)
  • small
  • medium
  • large

If you want to scale to small_mincpureq, see the steps in Scaling Data Virtualization to the size small_mincpureq.

You can manually scale the t-shirt sizes in Data Virtualization, or you can enable autoscaling.

When autoscaling is enabled, Data Virtualization automatically increases the number of Data Virtualization worker pods when the average CPU usage of the Data Virtualization head and worker pods reaches 90% of the CPU limit of the specified t-shirt size. The maximum number of Data Virtualization worker pods that autoscaling can create is set as part of the t-shirt size that is specified in the Data Virtualization db2u-dv custom resource (CR).

Autoscaling in Data Virtualization also reduces the number of Data Virtualization worker pods, if reducing the number of worker pods does not cause the average CPU usage to exceed the 90% threshold. The total number of Data Virtualization worker pods does not drop below the number of Data Virtualization worker pods that is specified for the t-shirt size in the CR.

For more information about the values that are specified for the standard t-shirt sizes in Data Virtualization, see Downloading the component scaling guidance PDF from the IBM Entitled Registry.

Custom sizing

You can use custom size, cpu, and memory settings in the CR of the service instance to scale Data Virtualization. For more information about custom size settings in Data Virtualization, see the Component scaling guidance PDF document. For more information about how to access the PDF, see Downloading the component scaling guidance PDF from the IBM Entitled Registry.

For more information about switching between the standard t-shirt size settings and custom settings, see Switching between standard t-shirt sizes and custom sizes.

Configuring standard t-shirt sizing and enabling and disabling autoscaling in Data Virtualization

Modify the scalingOpts.tShirtSize setting in the CR of the service instance to specify whether you are using standard sizes or custom sizes to scale Data Virtualization.

Modify the scalingOpts.autoscaling setting to turn autoscaling on or off.

Complete the following steps to scale a Data Virtualization service instance to extrasmall, small, medium, or large:

  1. Run the following command in the namespace that the corresponding bigsql db2u-dv CR is running in to change the Data Virtualization resource settings in the CR:
    oc patch bigsql db2u-dv --namespace ${PROJECT_CPD_INSTANCE} --patch '{"spec": {"scalingOpts": {"tShirtSize": "<t-shirt size>", "autoscaling":<autoscaling option>}}}' --type=merge

    The values that you specify for the options <t-shirt size> and <autoscaling option> when you run the command depend on which settings you are changing and the size settings that you want to use:

    • To change the t-shirt size, but retain your current setting for autoscaling, enter one of the following <t-shirt size> values:
      • extrasmall
      • small
      • medium
      • large
    • To change only the autoscaling setting, add your current t-shirt size setting from the CR to the command and then change the <autoscaling option> to either true or false.

    • To change both the autoscaling setting and the t-shirt size, enter a new t-shirt size and a new autoscaling option.

Scaling Data Virtualization to the size small_mincpureq

To scale to the CPU size small_mincpureq, complete the following steps:

  1. If your bigsql db2u-dv CR does not have t-shirt size settings enabled, switch to standard t-shirt sizing. For more information, see Switching between standard t-shirt sizes and custom sizes.
  2. Set the db2u-dv CR to the small t-shirt size and disable autoscaling. For more information, see Scaling by using standard t-shirt sizing.
  3. Run the following command to change the small_mincpureq CPU requests value:
    oc -n ${INSTANCE_PROJECT} patch sts c-db2u-dv-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"}]'

    Set the INSTANCE_PROJECT environment variable to the project where the service instance exists.

    • If the service instance is in the operands project, run the following command:

      export INSTANCE_PROJECT=${PROJECT_CPD_INST_OPERANDS}
    • If the service instance is in a tethered project, run the following command:

      export INSTANCE_PROJECT=${PROJECT_CPD_INSTANCE_TETHERED}
  4. To scale from the current t-shirt size, set a t-shirt size that is not small to trigger the bigsql db2u-dv CR to reconcile and update the cpu and memory settings in the c-db2u-dv-db2u statefulset.

Switching between standard t-shirt sizes and custom sizes

Complete the following steps to switch from standard t-shirt sizes to custom sizes:
  1. Run the following command to edit the CR:
    oc edit bigsql db2u-dv
  2. In the db2uClusterSpec: section, add the following details after the version: 3.0.0 line:
    scalingOpts:
      tShirtSize: <tshirt size>
      autoscaling: <false or true>
  3. Remove the size: <number> line.

  4. Save the changes then exit.
Complete the following steps to switch from custom sizes to standard t-shirt sizes:
  1. Run the following command to edit the CR:
    oc edit bigsql db2u-dv
  2. In the db2uClusterSpec: section, remove the entire scalingOpts: section.
  3. After the version: 3.0.0 line, add the size: <number> line.
  4. Save the changes then exit.