Changing kernel parameter settings
Db2U is a dependency for some services. By default, Db2U runs with elevated privileges in most environments. However, depending on your Red Hat® OpenShift® Container Platform environment, you might be able to change the kernel parameter settings to allow Db2U to run with limited privileges.
- Installation phase
-
Setting up a client workstation
Setting up a cluster
Collecting required information
Preparing to run installs in a restricted network
Preparing to run installs from a private container registry
Preparing the cluster for Cloud Pak for Data
Preparing to install an instance of Cloud Pak for Data
Installing an instance of Cloud Pak for Data
Setting up the Cloud Pak for Data control plane
Installing solutions and services
- Who needs to complete this task?
- A cluster administrator must complete this task.
- When do you need to complete this task?
- Review Determining what privileges Db2U runs with to determine whether you need to complete this task.
Determining what privileges Db2U runs with
Db2U is a dependency for the following services:
- Data Product Hub
- Data Virtualization
- Db2
- Db2 Big SQL
- Db2 Warehouse
- IBM Knowledge Catalog
- IBM Knowledge Catalog Premium
- IBM Knowledge Catalog Standard
- OpenPages
The options that are available to you are based on your Red Hat OpenShift Container Platform environment:
- Managed OpenShift
-
You cannot change the node settings. You must allow Db2U to run with elevated privileges.
During the installation of the services, an instance administrator specifies the privileges that Db2U runs with. In Managed OpenShift environments, the administrator must set Db2U to run with elevated privileges.
- Self-managed OpenShift
-
Cloud deployment environment Options On-premises You can either:- Allow Db2U to run with elevated
privileges (default).If you allow Db2U to run with elevated privileges, the Db2U security context has the following setting that is required for the Db2U
init-kernelcontainer:allowPrivilegedContainer: trueIf you choose this option, you do not need to modify the kernel parameter settings.
However, before you install the services, complete Specifying the privileges that Db2U runs with.
- Change the kernel parameter settings so that Db2U can run with limited privileges.Important: If you configure Db2U to run with limited privileges, only 1 Db2U engine pod can be scheduled onto a compute node at a time.
If you plan to install multiple services with a dependency on Db2U, you might need more resources to support multiple Db2U engine pods. For example, if you install Data Product Hub and Db2 Warehouse, you must have sufficient resources to run each Db2U engine pod on a different worker node.
See Determining which configuration tasks are required to run Db2U with limited privileges to determine which steps you must complete based on the services that you plan to install.
IBM Cloud If you install Cloud Pak for Data from the IBM Cloud Catalog, the kernel parameter settings are automatically applied to your cluster, and Db2U runs with limited privileges.
If you manually install Cloud Pak for Data, you can either:- Allow Db2U to run with elevated
privileges (default).If you allow Db2U to run with elevated privileges, the Db2U security context has the following setting that is required for the Db2U
init-kernelcontainer:allowPrivilegedContainer: trueIf you choose this option, you do not need to modify the kernel parameter settings.
However, before you install the services, complete Specifying the privileges that Db2U runs with.
- Change the kernel parameter settings so that Db2U can run with limited privileges.Important: If you configure Db2U to run with limited privileges, only 1 Db2U engine pod can be scheduled onto a compute node at a time.
If you plan to install multiple services with a dependency on Db2U, you might need more resources to support multiple Db2U engine pods. For example, if you install Data Product Hub and Db2 Warehouse, you must have sufficient resources to run each Db2U engine pod on a different worker node.
See Determining which configuration tasks are required to run Db2U with limited privileges to determine which steps you must complete based on the services that you plan to install.
Amazon Web Services You can either:- Allow Db2U to run with elevated
privileges (default).If you allow Db2U to run with elevated privileges, the Db2U security context has the following setting that is required for the Db2U
init-kernelcontainer:allowPrivilegedContainer: trueIf you choose this option, you do not need to modify the kernel parameter settings.
However, before you install the services, complete Specifying the privileges that Db2U runs with.
- Change the kernel parameter settings so that Db2U can run with limited privileges.Important: If you configure Db2U to run with limited privileges, only 1 Db2U engine pod can be scheduled onto a compute node at a time.
If you plan to install multiple services with a dependency on Db2U, you might need more resources to support multiple Db2U engine pods. For example, if you install Data Product Hub and Db2 Warehouse, you must have sufficient resources to run each Db2U engine pod on a different worker node.
See Determining which configuration tasks are required to run Db2U with limited privileges to determine which steps you must complete based on the services that you plan to install.
Microsoft Azure You can either:- Allow Db2U to run with elevated
privileges (default).If you allow Db2U to run with elevated privileges, the Db2U security context has the following setting that is required for the Db2U
init-kernelcontainer:allowPrivilegedContainer: trueIf you choose this option, you do not need to modify the kernel parameter settings.
However, before you install the services, complete Specifying the privileges that Db2U runs with.
- Change the kernel parameter settings so that Db2U can run with limited privileges.Important: If you configure Db2U to run with limited privileges, only 1 Db2U engine pod can be scheduled onto a compute node at a time.
If you plan to install multiple services with a dependency on Db2U, you might need more resources to support multiple Db2U engine pods. For example, if you install Data Product Hub and Db2 Warehouse, you must have sufficient resources to run each Db2U engine pod on a different worker node.
See Determining which configuration tasks are required to run Db2U with limited privileges to determine which steps you must complete based on the services that you plan to install.
Google Cloud You can either:- Allow Db2U to run with elevated
privileges (default).If you allow Db2U to run with elevated privileges, the Db2U security context has the following setting that is required for the Db2U
init-kernelcontainer:allowPrivilegedContainer: trueIf you choose this option, you do not need to modify the kernel parameter settings.
However, before you install the services, complete Specifying the privileges that Db2U runs with.
- Change the kernel parameter settings so that Db2U can run with limited privileges.Important: If you configure Db2U to run with limited privileges, only 1 Db2U engine pod can be scheduled onto a compute node at a time.
If you plan to install multiple services with a dependency on Db2U, you might need more resources to support multiple Db2U engine pods. For example, if you install Data Product Hub and Db2 Warehouse, you must have sufficient resources to run each Db2U engine pod on a different worker node.
See Determining which configuration tasks are required to run Db2U with limited privileges to determine which steps you must complete based on the services that you plan to install.
- Allow Db2U to run with elevated
privileges (default).
Determining which configuration tasks are required to run Db2U with limited privileges
In self-managed OpenShift environments, use the following table to determine the appropriate configuration tasks to complete based on the services that you plan to install.
| If you plan to install any of these services | Complete this task |
|---|---|
|
Changing the node settings by running the |
|
Changing node settings by using the Node Tuning Operator. |
Changing node settings by running the cpd-cli manage apply-db2-kubelet command
cpd-cli
manage
apply-db2-kubelet command to set interprocess communication (IPC)
kernel parameters if you want to run Db2U
with limited privileges and you plan to install one or more of the following services:- Data Product Hub
- Db2
- Db2 Warehouse SMP
- IBM Knowledge Catalog
- IBM Knowledge Catalog Premium
- IBM Knowledge Catalog Standard
- OpenPages
Ensure that you source the environment variables before you run the commands in this task.
apply-db2-kubelet command makes the following changes to the cluster
nodes:allowedUnsafeSysctls:
- "kernel.msg*"
- "kernel.shm*"
- "kernel.sem"To change the kernel parameter settings:
- Log the
cpd-cliin to the Red Hat OpenShift Container Platform cluster:${CPDM_OC_LOGIN} - Check whether there is an existing
kubeletconfigon the cluster:oc get kubeletconfig - Take the appropriate action based on whether the command returns the name of a
kubeletconfig:- If the preceding command returns an existing
kubeletconfig:- Set the
KUBELET_CONFIGenvironment variable to the name of the existingkubeletconfig:export KUBELET_CONFIG=<kubeletconfig-name> - Run the following command to patch the
kubeletconfig:oc patch kubeletconfig ${KUBELET_CONFIG} \ --type=merge \ --patch='{"spec":{"kubeletConfig":{"allowedUnsafeSysctls":["kernel.msg*", "kernel.shm*", "kernel.sem"]}}}'
- Set the
- If the preceding command returns
No resources found, run theapply-db2-kubeletcommand:cpd-cli manage apply-db2-kubelet
- If the preceding command returns an existing
Before you install the services on your cluster, ensure that you complete Specifying the privileges that Db2U runs with.
Changing node settings by using the Node Tuning Operator
You can use the Red Hat OpenShift Node Tuning Operator to set interprocess communication (IPC) kernel parameters if you want to run Db2U with limited privileges for one or more of the following services:
- Data Virtualization
- Db2 Big SQL
- Db2 Warehouse MPP
Decide whether you plan to deploy the services on dedicated nodes. With dedicated nodes, you can limit node tuning to the nodes where the service or services will run.
For more information about setting up dedicated nodes, see Setting up dedicated nodes for your Db2 Warehouse deployment.
The Node Tuning Operator helps you manage node-level tuning by orchestrating the tuned daemon. Tuned is a system tuning service for Linux®. The core of Tuned are profiles, which tune your system for different use cases. In addition to static application of system settings, Tuned can also monitor your system and optimize the performance on-demand based on the profile that is applied.
Tuned is distributed with a number of predefined profiles. However, it is also possible to modify the rules defined for each profile and customize how and what to tune. Tuned supports various types of system configuration such as sysctl, sysfs, and kernel boot parameters. For more information, see Monitoring and managing system status and performance and The Tuned Project
The Node Tuning Operator provides a unified management interface to users of node-level sysctls and gives more flexibility to add custom tuning.
The operator manages the containerized tuned daemon for Red Hat OpenShift Container Platform as a Kubernetes DaemonSet. It ensures the custom tuning specification is passed to all containerized tuned daemons that run in the cluster in the format that the daemons understand. The daemons run on all nodes in the cluster, one per node.
The Node Tuning Operator is part of a standard Red Hat OpenShift Container Platform installation. For more information, see Using the Node Tuning Operator in the Red Hat OpenShift documentation:
You can employ the Node Tuning Operator by using one of the following methods:
- Creating a custom resource file
- The custom resource method requires you to manually compute all required IPC kernel parameters.
- Creating a shell script
- The shell script enables you to generate a YAML file that you can install, deploy, and run on
the target OpenShift cluster.
The shell script automatically calculates the required IPC kernel parameters for you.
Before you install the services on your cluster, ensure that you complete Specifying the privileges that Db2U runs with.