Configuring for an IBM Power environment
The following configuration settings are recommended when installing IBM® Cloud Private in an IBM Power environment.
Operating system swap partition settings
Add a small swap partition and disable swap accounting to control short spikes in pod memory usage that are beyond the set limit and to avoid out-of-memory errors.
Note: The swap space should not be larger than 4 GB. The swap space should not be shared with drives that manage large amounts of I/O activity, like /var/lib/docker and /var/log.
-
Enable a small swap partition (2-4 GB) on each node in the cluster.
-
For Red Hat Enterprise Linux, add
swapaccount=0to the kernel command line by completing the following steps:-
Open the
/etc/default/grubfile. -
Add
swapaccount=0to the existing options by editing the GRUB_CMDLINE_LINUX option. -
Run the following command:
grub2-mkconfig -o /boot/grub2/grub.cfg -
Reboot the nodes before installing IBM Cloud Private.
Note: Swap accounting is disabled by default on Ubuntu and SUSE Linux Enterprise Server, so no kernel command line changes are required for those operating systems.
-
IBM Cloud Private settings
Some of your IBM Cloud Private environment settings are determined by how you are configuring your IBM Power environment. The following sections describe a sample environment and its recommended configuration settings.
Important: The recommendations in this section are for clusters that have both a Power master and Power management nodes. For a mixed cluster in which Power nodes are only workers, only apply the operating system changes in the Operating system section.
Characteristics of the configuration:
-
The number of CPUs is 32, or greater (as identified by the operating system).
CPUs that are identified by the operating system can be different than the CPU that is configured on the LPAR profile for PowerVM hypervisors. For example, the operating system of a PowerVM Logical Partition (LPAR) that is configured with 4 vCPUs reports 32 CPUs. This is because the default setting of SMT=8. The method that the operating system uses to determine the number of CPUs that are identified is determined by the following formula:
(vCPUs * SMT value)This example resolves as the following formula:
(4 * 8 = 32)To determine this value, you can run one of the following commands:
/proc/cpuinfoor
lscpu -
RAM is 64 GB, or greater.
-
For the PowerVM hypervisor, the processor entitlement must have a value that is greater than or equal to 2 for the master and the management nodes.
Preinstallation settings
If you have 32 or more CPUs, you must update the settings in your config.yaml for the Power environment. There is a file named power_config.yaml in the xxx directory that contains the updated settings.
Replace the config.yaml file with the power.config.yaml file. If you are deploying your cluster into an IBM Power environment, you must use the settings in the power.config.yaml file. Complete the following
steps to replace the file:
-
Enter the following command to rename the existing
config.yamlfile toconfig.yaml.orig:sudo mv /<installation_directory>/cluster/config.yaml /<installation_directory>/cluster/config.yaml.origReplace installation_directory with the path to your installation directory.
-
Enter the following command to rename the
power.config.yamlfile toconfig.yaml:sudo cp /<installation_directory>/cluster/power.config.yaml /<installation_directory>/cluster/config.yamlReplace installation_directory with the path to your installation directory.
Post installation settings
You can optionally add an alert that notifies you if the memory usage of a container reaches 90% of its available memory. This alert indicates the need to revisit the size of the pod. Complete the following steps to create the alert:
-
Create a file named
pod-mem-usage-alert.yamlwith the following contents:apiVersion: monitoringcontroller.cloud.ibm.com/v1 kind: AlertRule metadata: name: pod-mem-usage spec: enabled: true data: |- groups: - name: podMemUsage rules: - alert: podMemUsage expr: (sum(container_memory_working_set_bytes) by (name, pod_name, namespace)/sum(container_spec_memory_limit_bytes) by (name, pod_name, namespace)) > 0.90 and (sum(container_memory_working_set_bytes) by (name, pod_name, namespace)/sum(container_spec_memory_limit_bytes) by (name, pod_name, namespace)) != Inf for: 30m annotations: description: 'Pod {{ $labels.pod_name }} in namespace {{ $labels.namespace }} is reaching memory limit threshold' summary: Memory Utilization of Pod is reaching limit -
Implement the new alert by entering the following command:
kubectl apply -f pod-mem-usage-alert.yamlSee the Alerts section of IBM Cloud Private Cluster Monitoring for more information about alerts. Tip: See
https://icp-master-ip:8443/alertmanagerto view your active alerts.