Your SlideShare is downloading. ×
0
Xen PMU
Boris Ostrovsky, Oracle
Xen Developer Summit
Oct 24-25, 2013

1Copyright © 2013, Oracle and/or its affiliates. All...
Agenda


Profiling methods



Existing tools



Why perf



Design requirements



High-level design



Status



N...
Profiling Methods


Timing



Counting






Software: counting probes
Hardware: performance counters

Sampling



...
Existing Tools


Guests


SW-based methods: any guest, most tools



HW-based methods:






HVM: Counters, BTS: mos...
Why perf


Why not (xen)oprofile






not inthe tree
not in active development

perf


in the tree



active develo...
Desired Properties


Use HVM VPMU for both PV and HVM



As little as possible non-Xen changes in Linux kernel




Sta...
(Very) High-Level Design Features


Manage PMU in current VPMU






VPMU states
VPMU context (i.e. registers)

On PMU...
Status


Limitations




Only profile hypervisor CPUs where dom0 is running



Only counters are supported (no IBS/PEB...
Future Enhancements


Address limitations from stage 1


No pinning requirement



#PCPUs > #VCPUs in dom0



Tracing ...
Example (perf record/report)

10Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Example (perf kvm record/report)

11Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Upcoming SlideShare
Loading in...5
×

XPDS13: Perf Support in Xen - Boris Ostrovsky, Oracle

823

Published on

Hardware performance monitoring facilities such as counters can provide invaluable information about system behavior. In recent years, Linux 'perf' has become the standard tool for managing these facilities and interpreting data that they generate. In this talk we will discuss changes to Xen and Linux that will allow PV guests (including dom0) use perf for profiling themselves and, in the case of dom0, the hypervisor.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
823
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "XPDS13: Perf Support in Xen - Boris Ostrovsky, Oracle"

  1. 1. Xen PMU Boris Ostrovsky, Oracle Xen Developer Summit Oct 24-25, 2013 1Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  2. 2. Agenda  Profiling methods  Existing tools  Why perf  Design requirements  High-level design  Status  Next steps 2Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  3. 3. Profiling Methods  Timing  Counting    Software: counting probes Hardware: performance counters Sampling    Software: timer-based Hardware: HW counters, IBS, PEBS Tracing  Software events: recording probes  Hardware events (Intel BTS) 3Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  4. 4. Existing Tools  Guests  SW-based methods: any guest, most tools  HW-based methods:    HVM: Counters, BTS: most tools PV: xenoprofile Hypervisor  SW-based methods: xentrace, xenalyze, xentop, xenperf  HW-based methods: xenoprofile 4Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  5. 5. Why perf  Why not (xen)oprofile    not inthe tree not in active development perf  in the tree  active development  lots of features 5Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  6. 6. Desired Properties  Use HVM VPMU for both PV and HVM  As little as possible non-Xen changes in Linux kernel   Staged development Possibility of other tools using the same framework 6Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  7. 7. (Very) High-Level Design Features  Manage PMU in current VPMU    VPMU states VPMU context (i.e. registers) On PMU interrupt stop all counters  Emulate PMU in Linux to avoid traps on MSR accesses  Domain re-enables PMU via hypercall when done processing the interrupt  Global profile mode   Dom0 profiles everyone APIC and NMI mode 7Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  8. 8. Status  Limitations   Only profile hypervisor CPUs where dom0 is running  Only counters are supported (no IBS/PEBS)   PV VCPUs should be pinned No backtrace support (for the hypervisor) V3 for Xen in progress  4.4 is unlikely  coordinate with Linux patches  perf toolstack changes (not Xen-specific code) 8Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  9. 9. Future Enhancements  Address limitations from stage 1  No pinning requirement  #PCPUs > #VCPUs in dom0  Tracing multiple guests in global mode  New HW features (PEBS, IBS)  Tracing (xentrace?) 9Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  10. 10. Example (perf record/report) 10Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  11. 11. Example (perf kvm record/report) 11Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×