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.

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:

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:

  1. Enter the following command to rename the existing config.yaml file to config.yaml.orig:

    sudo mv /<installation_directory>/cluster/config.yaml  /<installation_directory>/cluster/config.yaml.orig
    

    Replace installation_directory with the path to your installation directory.

  2. Enter the following command to rename the power.config.yaml file to config.yaml:

    sudo cp /<installation_directory>/cluster/power.config.yaml /<installation_directory>/cluster/config.yaml
    

    Replace 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:

  1. Create a file named pod-mem-usage-alert.yaml with 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
    
  2. Implement the new alert by entering the following command:

    kubectl apply -f pod-mem-usage-alert.yaml
    

    See the Alerts section of IBM Cloud Private Cluster Monitoring for more information about alerts. Tip: See https://icp-master-ip:8443/alertmanager to view your active alerts.