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
extrasmall(Default size after Data Virtualization instance is provisioned.)small_mincpureq(Pod settings are optimized so that minimal resources are reserved on your clusters.)smallmediumlarge
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:
- Run the following command in the namespace that the corresponding
bigsql db2u-dvCR 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=mergeThe 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:extrasmallsmallmediumlarge
-
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 eithertrueorfalse. -
To change both the autoscaling setting and the t-shirt size, enter a new t-shirt size and a new autoscaling option.
- To change the t-shirt size, but retain your current setting for autoscaling, enter one of the
following
Scaling Data
Virtualization to the size small_mincpureq
To scale to the CPU size small_mincpureq, complete the following steps:
- If your
bigsql db2u-dvCR 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. - Set the
db2u-dvCR to thesmallt-shirt size and disable autoscaling. For more information, see Scaling by using standard t-shirt sizing. - 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 a t-shirt size that is not
smallto trigger thebigsql db2u-dvCR to reconcile and update the cpu and memory settings in thec-db2u-dv-db2ustatefulset.
Switching between standard t-shirt sizes and custom sizes
- Run the following command to edit the CR:
oc edit bigsql db2u-dv -
In the
db2uClusterSpec:section, add the following details after theversion: 3.0.0line:scalingOpts: tShirtSize: <tshirt size> autoscaling: <false or true> -
Remove the
size: <number>line. - Save the changes then exit.
- Run the following command to edit the CR:
oc edit bigsql db2u-dv - In the
db2uClusterSpec:section, remove the entirescalingOpts:section. - After the
version: 3.0.0line, add thesize: <number>line. - Save the changes then exit.