Running Docker Containers Xeon Phi Whitepaper
Running Docker Containers Xeon Phi Whitepaper
March 2017
Revision 001
Tables
Table 1 Difference Between Multiple Runs on Bare Metal ...........................13
Table 2 Difference Between Bare Metal and Container Results....................13
1.2 References
[1] Docker Inc., "Docker Documentation," 25 January 2017. [Online].
Available: https://docs.docker.com/.
[5] Intel Corporation, "Intel Math Kernel Library (Intel MKL)," [Online].
Available: https://software.intel.com/en-us/intel-mkl.
Micperf depends on several runtime libraries, and the results heavily depend on
their exact version. To simplify the execution of micperf benchmarks and to
ensure that the right dependencies are used, for the purpose of this white
paper, a containerized version of this package was created that can be
executed on any Linux distribution supported by Intel Xeon Phi processors
without the need to install extra packages.
To create a micperf container, a new directory was created where the Intel MKL
runtime distribution file was copied, the Intel® MPI distribution file, and the
OpenMP* library. Then, a typical Dockerfile* configuration file was created. The
content of this file is described below, while the complete file is shown in
Section 5.1.
FROM centos:7.2.1511
MAINTAINER <maintainer>@<domain>
ENV http_proxy="http://<proxy.address:port>/"
ENV https_proxy="https:// <proxy.address:port>/"
Some environment variables used within the container are also specified.
MKLROOT indicates where the Intel MKL runtime is installed.
LD_LIBRARY_PATH is modified to include the OpenMP runtime.
ENV MKLROOT="/opt/mkl"
ENV
LD_LIBRARY_PATH="/opt/intel/psxe_runtime/linux/compiler/lib/intel64
_lin:${LD_LIBRARY_PATH}"
Next, specify the filenames for the installation versions of the Intel MKL
runtime. The exact names should be changed when new versions of those
libraries are used.
The filenames of the latest versions of the micperf RPMs must be specified as
well:
The Intel MKL runtime is installed by unpacking the distribution tarball to the
desired location within the container image.
Once all dependencies are installed, install micperf into the newly created
container image.
Once the Dockerfile is defined, build the container. The container creation
requires root privileges.
Micperf uses two system calls, mbind() and set_mempolicy(), that are blocked
by the default configuration of Docker 1.12.x. Those system calls are needed to
enforce the memory allocation from MCDRAM instead of DDR.
To change the security configuration, the default security configuration file was
downloaded from Docker github:
raw.githubusercontent.com/docker/docker/v1.12.3/profiles/seccomp/default.js
on.
Based on that file, a new custom security configuration file was created called
micperf.json and added the following:
This new policy allows the use of mbind() and set_mempolicy() system calls
from the container.
Now the container can be run. The simplest way is to run it in the interactive
mode and run the micprun command within the container. First, the iterative
container is started:
Once the container prompt is shown, an entire set of all available benchmarks
can be run:
root@98df59cd3def# micprun
Micperf tries to detect coprocessors using dmidecode and lspci commands that
are intentionally not included in the container. Warning messages are
generated, but they can be ignored.
The installed OS (bare metal) software: Red Hat Enterprise Linux release 7.2
(Maipo), XPPSL 1.5.0, kernel 3.10.0-327.36.3.el7.xppsl_1.5.0.3509.x86_64.
sgemm 45 1.03%
Table 2 compares the average benchmark results obtained in the bare metal
(Native OS) and inside the container. It shows that the performance impact of
the containers can be ignored, as the difference between bare metal and
container average results are smaller than between multiple executions of the
same benchmark on the bare metal node.
ENV http_proxy="http://<your_proxy>:<your_proxy_port>/"
ENV https_proxy=<your_proxy>:<your_proxy_port>/
ENV MKLROOT="/opt/mkl"
ENV
LD_LIBRARY_PATH="/opt/intel/psxe_runtime/linux/compiler/lib/intel64
_lin:${LD_LIBRARY_PATH}"