• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Performance Profiling in a Virtualized Environment
 

Performance Profiling in a Virtualized Environment

on

  • 735 views

 

Statistics

Views

Total Views
735
Views on SlideShare
735
Embed Views
0

Actions

Likes
0
Downloads
6
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Performance Profiling in a Virtualized Environment Performance Profiling in a Virtualized Environment Presentation Transcript

    • Performance Profiling in a Virtualized EnvironmentJiaqing Du+, Nipun Sehrawat*, Willy Zwaenepoel++EPFL, Switzerland*IIT Guwahati, India
    • Virtualization-based Clouds• Diverse implementations – software: Xen, KVM, VMware, … – hardware: Intel x86, AMD x86, PowerPC, …• Opportunities for performance profiling & tuning – public cloud: guest OS & applications – private cloud: whole software stack Profilers based on CPU performance counters do not work well with virtual machines.Jiaqing Du, HotCloud, June 22, 2010 2
    • Profiling in a Virtualized Environment• General challenge• XenOProf: profiling in the VMM – only for paravirtualization-based Xen – require accesses to the VMM• Profiling in the guest – normally no results – “OProfile cant work with VMware when using performance counter interface. ”Jiaqing Du, HotCloud, June 22, 2010 3
    • Performance Profiling• Understand runtime behavior• Tune performance• Mature & used extensively – VTune, OProfile, … %CYCLE Function Module 98.5529 vmx_vcpu_run kvm-intel.ko 0.2226 (no symbols) libc.so 0.1034 hpet_cpuhp_notify vmlinux 0.1034 native_patch vmlinuxJiaqing Du, HotCloud, June 22, 2010 4
    • Native Profiling• Performance monitoring unit (PMU) – a set of event counters – generate an interrupt when a counter overflows• PMU-based profiler User control process – sampling configuration Kernel – sample collection Module Interpret* – sample interpretation Configure Collect CPU PMUJiaqing Du, HotCloud, June 22, 2010 5
    • Guest-wide Profiling• Expose PMU interfaces to the guest User control process Kernel Module Interpret* Configure Collect VMM CPU PMUJiaqing Du, HotCloud, June 22, 2010 6
    • Guest-wide Profiling• Where to save & restore the registers?• CPU switch – only in-guest execution is accounted to the guest guest1 VMM guest2 VMM guest2 save&restore• Domain switch – in-VMM execution is also accounted to the guest guest1 VMM guest2 VMM guest2 domain1 domain2 save&restoreJiaqing Du, HotCloud, June 22, 2010 7
    • Guest-wide Profiling for KVM• Kernel-based virtual machine (KVM) – a Linux kernel subsystem – a set of kernel modules + QEMU – built on hardware virtualization extensions• Intel VT extensions – provide a list of hardware features – facilitate our implementation• No modifications to the guest and the profilerJiaqing Du, HotCloud, June 22, 2010 8
    • Profiling Packet Receive• Experiment – push packets to a Linux guest in KVM – run OProfile in the guest – monitor instruction retirements Linux KVM virtual NIC Linux Hardware Hardware NIC NICJiaqing Du, HotCloud, June 22, 2010 9
    • Profiling Packet Receive CPU Switch Domain Switch INSTR Function INSTR Function 167 csum_partial 2261 cp_interrupt 106 csum_partial_copy_generic 1336 cp_rx_poll 74 copy_to_user 1034 cp_start_xmit 47 ipt_do_table 421 native_apic_mem_write 38 tcp_v4_rcv 374 native_apic_mem_read … … 191 csum_partial 19 cp_rx_poll 105 csum_partial_copy_generic 6 cp_start_xmit 94 copy_to_user 6 cp_interrupt 79 ipt_do_table 3 native_apic_mem_write 51 tcp_v4_rcv 1184 counter overflows 7286 counter overflowsJiaqing Du, HotCloud, June 22, 2010 10
    • Other Things in the Paper• System-wide profiling – profiling in the VMM – provide full-scale view: guest + VMM• Virtualization techniques – paravirtualization – dynamic binary translationJiaqing Du, HotCloud, June 22, 2010 11
    • Conclusions• Profilers do not work well with virtual machines.• We implement guest-wide profiling in a VMM based on hardware assistance.• Profiling helps understand the real cost of I/O operations in a guest.Jiaqing Du, HotCloud, June 22, 2010 12