skip to main content
research-article

Performance profiling of virtual machines

Authors Info & Claims
Published:09 March 2011Publication History
Skip Abstract Section

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.Google ScholarGoogle Scholar
  2. Performance Counters for Linux. 2010. http://lwn.net/Articles/310176.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. G. Banga, P. Druschel, and J.C. Mogul. Resource containers: A new facility for resource management in server systems. Operating Systems Review, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. F. Bellard. QEMU, a fast and portable dynamic translator. In Pro-ceedings of the USENIX 2005 Annual Technical Conference, FREENIX Track, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Stanislav Bratanov, Roman Belenov, and Nikita Manovich. Virtual machines: a whole new world for performance analysis. Operating Systems Review, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. P. Druschel and G. Banga. Lazy receiver processing (LRP): A network subsystem architecture for server systems. Operating Systems Review, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. S.L. Graham, P.B. Kessler, and M.K. Mckusick. Gprof: A call graph execution profiler. ACM SIGPLAN Notices, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Intel Inc. Intel VTune Performance Analyser, 2010. http://software.intel.com/en-us/intel-vtune/.Google ScholarGoogle Scholar
  14. VMware Inc. Vmkperf for VMware ESX 4.0, 2010.Google ScholarGoogle Scholar
  15. Intel. Intel 64 and IA-32 Architectures Software Developer's Manual Volume 3: System Programming Guide.Google ScholarGoogle Scholar
  16. A. Kivity, Y. Kamay, D. Laor, U. Lublin, and A. Liguori. kvm: the Linux virtual machine monitor. In Linux Symposium, 2007.Google ScholarGoogle Scholar
  17. J. Levon and P. Elie. Oprofile: A system profiler for linux. 2010. http://oprofile.sourceforge.net.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Rosenblum and T. Garfinkel. Virtual machine monitors: Current technology and future trends. Computer, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. R. Russell. virtio: towards a de-facto standard for virtual I/O devices. Operating Systems Review, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. B. Sprunt. The basics of performance-monitoring hardware. IEEE MICRO, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Performance profiling of virtual machines

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!