skip to main content
research-article

Performance profiling of virtual machines

Published: 09 March 2011 Publication History

Abstract

Profilers based on hardware performance counters are indispensable for performance debugging of complex software systems. All modern processors feature hardware performance counters, but current virtual machine monitors (VMMs) do not properly expose them to the guest operating systems. Existing profiling tools require privileged access to the VMM to profile the guest and are only available for VMMs based on paravirtualization. Diagnosing performance problems of software running in a virtualized environment is therefore quite difficult.
This paper describes how to extend VMMs to support performance profiling. We present two types of profiling in a virtualized environment: guest-wide profiling and system-wide profiling. Guest-wide profiling shows the runtime behavior of a guest. The profiler runs in the guest and does not require privileged access to the VMM. System-wide profiling exposes the runtime behavior of both the VMM and any number of guests. It requires profilers both in the VMM and in those guests.
Not every VMM has the right architecture to support both types of profiling. We determine the requirements for each of them, and explore the possibilities for their implementation in virtual machines using hardware assistance, paravirtualization, and binary translation.
We implement both guest-wide and system-wide profiling for a VMM based on the x86 hardware virtualization extensions and system-wide profiling for a VMM based on binary translation. We demonstrate that these profilers provide good accuracy with only limited overhead.

References

[1]
Enhance perf to collect KVM guest os statistics from host side. 2010. http://lwn.net/Articles/378778.
[2]
Performance Counters for Linux. 2010. http://lwn.net/Articles/310176.
[3]
K. Adams and O. Agesen. A comparison of software and hardware techniques for x86 virtualization. In Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems, 2006.
[4]
J.M. Anderson, L.M. Berc, J. Dean, S. Ghemawat, M.R. Henzinger, S.T.A. Leung, R.L. Sites, M.T. Vandevoorde, C.A. Waldspurger, and W.E. Weihl. Continuous profiling: where have all the cycles gone? Operating Systems Review, 1997.
[5]
G. Banga, P. Druschel, and J.C. Mogul. Resource containers: A new facility for resource management in server systems. Operating Systems Review, 1998.
[6]
P. Barham, B. Dragovic, K. Fraser, S. Hand, T. Harris, A. Ho, R. Neugebauer, I. Pratt, and A. Warfield. Xen and the art of virtualization. In Proceedings of the 9th ACM Symposium on Operating Systems Principles, 2003.
[7]
F. Bellard. QEMU, a fast and portable dynamic translator. In Pro-ceedings of the USENIX 2005 Annual Technical Conference, FREENIX Track, 2005.
[8]
R. Bhargava, B. Serebrin, F. Spadini, and S. Manne. Accelerating two-dimensional page walks for virtualized systems. In Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems, 2008.
[9]
Stanislav Bratanov, Roman Belenov, and Nikita Manovich. Virtual machines: a whole new world for performance analysis. Operating Systems Review, 2009.
[10]
P. Druschel and G. Banga. Lazy receiver processing (LRP): A network subsystem architecture for server systems. Operating Systems Review, 1996.
[11]
J. Du, N. Sehrawat, and W. Zwaenepoel. Performance profiling in a virtualized environment. In Proceedings of the 2nd USENIX Workshop on Hot Topics in Cloud Computing, 2010.
[12]
S.L. Graham, P.B. Kessler, and M.K. Mckusick. Gprof: A call graph execution profiler. ACM SIGPLAN Notices, 1982.
[13]
Intel Inc. Intel VTune Performance Analyser, 2010. http://software.intel.com/en-us/intel-vtune/.
[14]
VMware Inc. Vmkperf for VMware ESX 4.0, 2010.
[15]
Intel. Intel 64 and IA-32 Architectures Software Developer's Manual Volume 3: System Programming Guide.
[16]
A. Kivity, Y. Kamay, D. Laor, U. Lublin, and A. Liguori. kvm: the Linux virtual machine monitor. In Linux Symposium, 2007.
[17]
J. Levon and P. Elie. Oprofile: A system profiler for linux. 2010. http://oprofile.sourceforge.net.
[18]
A. Menon, J.R. Santos, Y. Turner, G.J. Janakiraman, and W. Zwaenepoel. Diagnosing performance overheads in the Xen virtual machine environment. In Proceedings of the 1st ACM/USENIX International Conference on Virtual Execution Environments, 2005.
[19]
M. Rosenblum and T. Garfinkel. Virtual machine monitors: Current technology and future trends. Computer, 2005.
[20]
R. Russell. virtio: towards a de-facto standard for virtual I/O devices. Operating Systems Review, 2008.
[21]
B. Sprunt. The basics of performance-monitoring hardware. IEEE MICRO, 2002.
[22]
A. Srivastava and A. Eustace. ATOM: A system for building customized program analysis tools. In Proceedings of the ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation, 1994.
[23]
M. Zagha, B. Larson, S. Turner, and M. Itzkowitz. Performance analysis using the MIPS R10000 performance counters. In Proceedings of the 1996 ACM/IEEE Conference on Supercomputing,1996.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 46, Issue 7
VEE '11
July 2011
231 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/2007477
Issue’s Table of Contents
  • cover image ACM Conferences
    VEE '11: Proceedings of the 7th ACM SIGPLAN/SIGOPS international conference on Virtual execution environments
    March 2011
    250 pages
    ISBN:9781450306874
    DOI:10.1145/1952682
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 09 March 2011
Published in SIGPLAN Volume 46, Issue 7

Check for updates

Author Tags

  1. binary translation
  2. hardware-assisted virtualization
  3. paravirtualization
  4. performance profiling
  5. virtual machine

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)26
  • Downloads (Last 6 weeks)2
Reflects downloads up to 06 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media