User Guide

Contents

Profile Container Targets from the Host

Launch
Intel® VTune™
Profiler
from the host and profile native or Java* applications running in an LXC*, Docker, Mesos*, or Singularity* container on a Linux system.

Prerequisites

VTune
Profiler
automatically detects an application running in the container. No container configuration specific for performance analysis is required. But to run user-mode sampling analysis types (Hotspots or Threading), make sure to run the container with the
ptrace
support enabled:
host> docker run --cap-add=SYS_PTRACE -td myimage
or launch the container in the privileged mode:
host> docker run --privileged -td myimage

Configure and Run an Analysis for a Container Target

Set up your analysis for a target running in the container, using the following supported target and analysis types:
Target Type
Analysis Type
  • Attach to Process
  • Profile System
  • User-Mode Sampling Hotspots
  • Hardware Event-Based Sampling Hotspots
  • Microarchitecture Exploration
  1. Create a
    VTune
    Profiler
    project
    on the host system.
  2. From the
    WHERE
    pane of the
    Configure Analysis
    window, select the
    Local Host
    system to start analysis from your host Linux system or
    Remote Linux (SSH)
    to start analysis from a remote Linux system connected to your host system via SSH. For the remote Linux targets, make sure to configure SSH connection.
  3. From the
    WHAT
    section, specify your analysis target. For container target analysis, the following target types are supported:
    Attach to Process
    and
    Profile System
    .
    Configure your process or system target as usual using available configuration options.
    In the
    Profile System
    mode,
    VTune
    Profiler
    profiles
    all
    applications running in the same container or in different containers simultaneously. So, the standard limitation for the system-wide profiling of the managed code is not applicable to Java applications running in the containers.
    You can attach the
    VTune
    Profiler
    running under the superuser account to a Java process or a C/C++ application with embedded JVM instance running under a low-privileged user account. For example, you may attach the
    VTune
    Profiler
    to Java based daemons or services.
    The dynamic attach mechanism is supported only with the Java Development Kit (JDK).
  4. From the
    HOW
    section, select an analysis and customize the analysis options, if required.
    The Hotspots (
    hardware event-based sampling
    mode) and Microarchitecture Exploration analyses are configured to use driverless data collection based on the Linux Perf* tool to gather performance data for targets running in a container.
  5. Click
    Start
    to launch the analysis.
Alternatively, you may configure and run any of these analyses using the
VTune
Profiler
command line interface (). For example, to run a system-wide Hotspots analysis locally, enter:
host>
vtune
-collect hs -knob sampling-mode=hw -analyze-system -d 60
To run Hotspots analysis in the Attach to Process mode on a remote system, enter:
host>
vtune
-target-system=ssh:user1@172.16.254.1 -collect hs -knob sampling-mode=hw -target-process=java -d 60

View Data

The collected result opens in the default Hotspots viewpoint, where paths to container modules show up with prefixes (for instance,
docker
or
lxc
):

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804