Scaling Data Virtualization

You can scale a Data Virtualization instance to increase processing capacity by using standard t-shirt sizes or custom sizes.

About standard t-shirt sizing, custom sizing, and autoscaling

You can scale your service instance according to existing t-shirt sizes in Data Virtualization, or manually configure custom sized settings. In addition, you can enable autoscaling so that resources are automatically added or reduced based on CPU demands.
About t-shirt sizing
A t-shirt size is a preset resource configuration for your service instance.

You can specify the following t-shirt cluster sizes for Data Virtualization:
  • extrasmall: This is the default standard t-shirt size after you provision a Data Virtualization instance.
  • small_mincpureq: This is not a standard t-shirt size. This size is intended to optimize pod settings so that the service instance runs with minimal resources, freeing up resources for other pods that require it. To scale to small_mincpureq, see Scaling Data Virtualization to the size small_mincpureq.
  • small: This is a standard t-shirt size.
  • medium: This is a standard t-shirt size.
  • large: This is a standard t-shirt size.

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.

About custom sizing
About autoscaling
  • When you enable autoscaling, Data Virtualization automatically increases the number of Data Virtualization worker pods when the average CPU usage of the Data Virtualization head, worker and agent pods reaches 90% of the CPU limit of the specified t-shirt size. The maximum number of Data Virtualization worker and agent pods that autoscaling can create is set as part of the t-shirt size that is specified in the Data Virtualization db2u-dv CR.
    Note: Autoscaling is enabled by default only if you provisioned a Data Virtualization instance through the IBM Cloud Pak® for Data web client. Otherwise, you must specify whether you want to enable or disable autoscaling.
    Note: You can not enable autoscaling for custom sized service instances.
  • Autoscaling in Data Virtualization also reduces the number of Data Virtualization worker and agent pods, as long as reducing the number of worker and agent pods does not cause the average CPU usage to exceed the 90% threshold. The total number of Data Virtualization worker and agent pods does not drop below the number of Data Virtualization worker and agent pods that is specified for the t-shirt size in the CR.

Scaling Data Virtualization to a standard t-shirt size and configure autoscaling

Complete this step to modify the scalingOpts.tShirtSize setting in the CR of the service instance to scale Data Virtualization to a standard t-shirt size, and to modify the scalingOpts.autoscaling setting to enable or disable autoscaling:

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
Ensure you specify the values for <t-shirt size> and <autoscaling option> according to the t-shirt size and autoscaling settings that you want to use:
Change the t-shirt size but retain your current settings for autoscaling
Specify one of the following values for <t-shirt size>:
  • extrasmall
  • small
  • medium
  • large
Change only the autoscaling setting
Complete these steps to change only the autoscaling setting:
  1. Add your current t-shirt size setting from the CR to the command.
  2. Change the <autoscaling option> to either true or false to enable or disable autoscaling.
Change the t-shirt size and the autoscaling setting
Specify a new t-shirt size and autoscaling option.

Scaling Data Virtualization to the size small_mincpureq

The small_mincpureq allows the service instance to run with minimal CPU requirements. This is not a standard t-shirt size. To scale to this size, complete these steps:

  1. Conditional step: If your bigsql db2u-dv CR does not have t-shirt size settings enabled, then switch from custom to standard t-shirt sizing. Complete the steps in Switch from a custom size to a standard t-shirt size.
  2. Set the db2u-dv CR to the small t-shirt size and then disable autoscaling. Follow the steps from the previous section in Scaling to a standard t-shirt size and configure autoscaling.
  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 the t-shirt size to a size other than small to trigger the bigsql db2u-dv CR to reconcile and update the CPU and memory settings in the c-db2u-dv-db2u statefulset.

Scaling Data Virtualization to a custom size

Complete the steps in Customizing Queryplex pod sizes and resources.

Switching between standard t-shirt sizes and custom sizes

Switch from a custom size to a standard t-shirt size
Complete these steps to switch from standard t-shirt sizes to custom size:
  1. Run the following command to edit the CR:
    oc edit bigsql db2u-dv
  2. In the db2uClusterSpec: section, specify the following values after the line version: 3.0.0:
    scalingOpts:
      tShirtSize: <t-shirt size>
      autoscaling: <true or false>
    1. Specify a t-shirt size:
      • extrasmall
      • small
      • medium
      • large
    2. Specify the autoscaling option:
      • True (enable autoscaling)
      • False (disable autoscaling)
  3. Remove the line: size: <number>.
  4. Save the changes and then exit.
Switch from a standard t-shirt size to a custom size and enable or disable autoscaling
Complete these 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 scalingOpts: section.
  3. After the line version: 3.0.0, add the line: size: <number>. Replace <number> with the number of worker pods you want to have in your Data Virtualization instance. Data Virtualization automatically creates the head pod.
  4. Save the changes and then exit.