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
- 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 tosmall_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
-
- You can use custom size, cpu, and memory settings in the custom resource (CR) of the service instance when scaling Data Virtualization. To custom size your service instance, complete the steps in Customizing Queryplex pod sizes and resources.
- 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.
- If you want to switch between a standard t-shirt size and custom settings, see Switching between standard t-shirt sizes and custom sizes and configuring autoscaling.
- 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-dvCR.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.
- 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
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:
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<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>:extrasmallsmallmediumlarge
- Change only the autoscaling setting
- Complete these steps to change only the autoscaling setting:
- Add your current t-shirt size setting from the CR to the command.
- Change the
<autoscaling option>to eithertrueorfalseto 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:
- Conditional step: If your
bigsql db2u-dvCR 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. - Set the
db2u-dvCR to thesmallt-shirt size and then disable autoscaling. Follow the steps from the previous section in Scaling to a standard t-shirt size and configure autoscaling. - Run the following command to change the
small_mincpureqCPU 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_PROJECTenvironment 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}
-
- To scale from the current t-shirt size, set the t-shirt size to a size other than
smallto trigger thebigsql db2u-dvCR to reconcile and update the CPU and memory settings in thec-db2u-dv-db2ustatefulset.
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:
- Run the following command to edit the CR:
oc edit bigsql db2u-dv -
In the
db2uClusterSpec:section, specify the following values after the lineversion: 3.0.0:scalingOpts: tShirtSize: <t-shirt size> autoscaling: <true or false>- Specify a t-shirt size:
extrasmallsmallmediumlarge
- Specify the autoscaling option:
True(enable autoscaling)False(disable autoscaling)
- Specify a t-shirt size:
- Remove the line:
size: <number>. - Save the changes and then exit.
- Run the following command to edit the CR:
- 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:
- Run the following command to edit the CR:
oc edit bigsql db2u-dv - In the
db2uClusterSpec:section, remove thescalingOpts:section. - 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. - Save the changes and then exit.
- Run the following command to edit the CR: