Consider adjusting OMP_NUM_THREADS environment variable for containerized deployments

Consider adjusting OMP_NUM_THREADS environment variable for containerized deployments, one or more libraries use Intel’s MKL that does not detect correctly resource allocation in the cluster.

Issue description

OpenMKL detects number of CPUs present on a machine where the application runs. This generally does not need to correspond to number of CPUs allocated for containerized applications. Refer to Kubernetes documentation to get more information about assigning CPU requests to a pod.

Affected packages:

Severity

Issue fix

Make sure the OMP_NUM_THREADS environment variable is set and corresponds to number of CPUs allocated for the container.

Pipeline units

Recommendation types

See this document that describes recommendation types listed.

Advised manifest changes

Patch manifest for the deployed component (e.g. Job, Deployment, DeploymentConfig or any other) so that OMP_NUM_THREADS is set to number of CPUs requested for the container run.