Cookbook

  • 2020
  • 09/09/2020
  • Public Content
Contents

Configuring a Hyper-V* Virtual Machine for Hardware-Based Hotspots Analysis

This recipe helps you set up a Virtual Machine instance in the Hyper-V environment for hardware performance profiling with
Intel® VTune™
Profiler
.

Ingredients

This section lists the hardware and software tools used for the performance analysis scenario.
  • Tools:
  • CPU
    : Intel® Xeon® processor that supports Intel® Virtualization Technology (Intel® VT)
    You can also use any Intel microarchitecture with performance monitoring hardware, such as:
    Intel Microarchitecture code name
    PMU Version
    PEBS
    LBR
    IPT
    PT2GPA
    4
    Yes
    Yes
    Yes
    No
    4
    Yes
    Yes
    Yes
    Yes
    4
    Yes
    Yes
    Yes
    No
    4
    Yes
    Yes
    Yes
    No
    4
    Yes
    Yes
    No
    No
    3
    Yes
    Yes
    No
    No
    3
    Yes
    Yes
    No
    No
  • Operating system:
    Microsoft* Windows Server 2019 or Windows 10 Version 1809 (October 2018 Update) or later
  • BIOS
    with Intel VT support
Hyper-V may impose additional requirements described in the Enable Intel Performance Monitoring Hardware in a Hyper-V virtual machine
article.

Configure a Hyper-V Host

  1. Enable the Intel VT in the BIOS setup on your server:
    1. Access the system BIOS by pressing
      F2
      during the system power-on self test (POST).
    2. Click
      Advanced
      >
      Processor Configuration
      .
    3. Select
      Intel® Virtualization Technology
      and change to
      Enabled
      .
    4. Do an AC power cycle for changes to take effect.
  2. Go to
    Control Panel
    >
    Programs
    >
    Programs and Features
    and click
    Turn Windows features on or off
    on the left pane.
    The
    Windows Features
    dialog box opens.
  3. Expand the
    Hyper-V
    feature and select all the check boxes:
  4. Click
    OK
    and proceed with the installation.
    When the installation is complete, click
    Restart now
    .

Create and Configure a Virtual Machine

On your Hyper-V host (further,
host
), run Hyper-V Manager from the
Start
menu to create and configure a new VM (further,
VM
):
  1. From the
    Actions
    panel, click
    New
    and select
    Virtual Machine...
    :
  2. In the
    New Virtual Machine Wizard
    , specify all necessary parameters for the new machine (CPU configuration, Memory, Network, Hard Disk, and others).
    Recommended system requirements for the
    VTune
    Profiler
    are 4 GB RAM and at least 10 GB free disk space.
  3. Configure your installation source. For example, you can use local installation
    .iso
    image:
  4. Start the newly created VM and proceed with the OS installation process.

Configure the Virtual Machine for the Hardware Analysis

Prepare a target system instance for profiling by exposing PMU/PEBS/LBR to the VM:
  1. Turn off the newly created VM and launch your host Windows PowerShell as an Administrator from the
    Start
    menu.
  2. In the PowerShell, configure your VM to expose PMU, PEBS, LBR to the VM as follows:
    Set-VMProcessor -VMName your_vm_name -Perfmon pmu,pebs,lbr
  3. Turn on your VM.

Run Hotspots Analysis

Run the
VTune
Profiler
directly from the VM:
  1. Install the
    VTune
    Profiler
    on the VM.
  2. Run the
    VTune
    Profiler
    from
    Start
    menu.
  3. Create a project.
    The
    Configure Analysis
    window opens.
  4. On the
    WHERE
    pane, select
    Local Host
    .
  5. On the
    WHAT
    pane, specify the location of your application and its working directory.
  6. On the
    HOW
    pane, select the
    Hardware Event-Based Sampling
    collection mode for the Hotspots analysis.
    If you succeed with exposing PMU/PEBS/LBR, your analysis configuration pane will show no error messages and you will be able to perform the analysis.
  7. Click
    Start
    to run the analysis.
    The analysis result opens in the default
    Hotspots by CPU Utilization
    viewpoint.
You may perform the Hotspots analysis in multiple VMs running simultaneously.

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