performance profiling in a virtualized environment
play

Performance Profiling in a Virtualized Environment Jiaqing Du + , - PowerPoint PPT Presentation

Performance Profiling in a Virtualized Environment Jiaqing Du + , Nipun Sehrawat * , Willy Zwaenepoel + + EPFL, Switzerland * IIT Guwaha9, India Virtualiza9onbased Clouds Diverse implementa9ons soDware: Xen, KVM, VMware,


  1. Performance Profiling in a Virtualized Environment � Jiaqing Du + , Nipun Sehrawat * , Willy Zwaenepoel + + EPFL, Switzerland * IIT Guwaha9, India

  2. Virtualiza9on‐based Clouds � • Diverse implementa9ons – soDware: Xen, KVM, VMware, … – hardware: Intel x86, AMD x86, PowerPC, … • Opportuni9es for performance profiling & tuning – public cloud: guest OS & applica9ons – private cloud: whole soDware stack Profilers based on CPU performance counters do not work well with virtual machines. � Jiaqing Du, HotCloud, June 22, 2010 2

  3. Profiling in a Virtualized Environment � • General challenge • XenOProf: profiling in the VMM – only for paravirtualiza9on‐based Xen – require accesses to the VMM • Profiling in the guest – normally no results – “ OProfile can't work with VMware when using performance counter interface. ” Jiaqing Du, HotCloud, June 22, 2010 3

  4. Performance Profiling � • Understand run9me behavior • Tune performance • Mature & used extensively – VTune, OProfile, … %CYCLE � FuncCon � Module � 98.5529 � vmx_vcpu_run � kvm‐intel.ko � 0.2226 � (no symbols) � libc.so � 0.1034 � hpet_cpuhp_no9fy � vmlinux � 0.1034 � na9ve_patch � vmlinux � Jiaqing Du, HotCloud, June 22, 2010 4

  5. Na9ve Profiling � • Performance monitoring unit (PMU) – a set of event counters – generate an interrupt when a counter overflows • PMU‐based profiler User � control process – sampling configura9on Kernel � – sample collec9on Module Interpret * – sample interpreta9on Configure Collect CPU � PMU � Jiaqing Du, HotCloud, June 22, 2010 5

  6. Guest‐wide Profiling � • Expose PMU interfaces to the guest � User � control process Kernel � Module Interpret * Configure Collect VMM � CPU � PMU � Jiaqing Du, HotCloud, June 22, 2010 6

  7. Guest‐wide Profiling � • Where to save & restore the registers? • CPU switch – only in‐guest execu9on is accounted to the guest guest1 VMM guest2 VMM guest2 save&restore � • Domain switch – in‐VMM execu9on is also accounted to the guest guest1 VMM guest2 VMM guest2 domain1 � domain2 � save&restore � Jiaqing Du, HotCloud, June 22, 2010 7

  8. Guest‐wide Profiling for KVM � • Kernel‐based virtual machine (KVM) – a Linux kernel subsystem – a set of kernel modules + QEMU – built on hardware virtualiza9on extensions • Intel VT extensions – provide a list of hardware features – facilitate our implementa9on • No modifica9ons to the guest and the profiler Jiaqing Du, HotCloud, June 22, 2010 8

  9. Profiling Packet Receive � • Experiment – push packets to a Linux guest in KVM – run OProfile in the guest – monitor instruc9on re9rements Linux � KVM � Linux � virtual NIC � Hardware � Hardware � NIC � NIC � Jiaqing Du, HotCloud, June 22, 2010 9

  10. Profiling Packet Receive CPU Switch � Domain Switch � INSTR � FuncCon � INSTR � FuncCon � 167 � csum_par9al � 2261 � cp_interrupt � 106 � csum_par9al_copy_generic � 1336 � cp_rx_poll � 74 � copy_to_user � 1034 � cp_start_xmit � 47 � ipt_do_table � 421 � na9ve_apic_mem_write � 38 � tcp_v4_rcv � 374 � na9ve_apic_mem_read � … � … 191 � csum_par9al � 19 � cp_rx_poll � 105 � csum_par9al_copy_generic � 6 � cp_start_xmit � 94 � copy_to_user � 6 � cp_interrupt � 79 � ipt_do_table � 3 � na9ve_apic_mem_write � 51 � tcp_v4_rcv � 7286 counter overflows � 1184 counter overflows � Jiaqing Du, HotCloud, June 22, 2010 10

  11. Other Things in the Paper • System‐wide profiling – profiling in the VMM – provide full‐scale view: guest + VMM • Virtualiza9on techniques – paravirtualiza9on – dynamic binary transla9on Jiaqing Du, HotCloud, June 22, 2010 11

  12. 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 opera9ons in a guest. Jiaqing Du, HotCloud, June 22, 2010 12

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend