skip to main content
research-article

Preemptable ticket spinlocks: improving consolidated performance in the cloud

Published:16 March 2013Publication History
Skip Abstract Section

Abstract

When executing inside a virtual machine environment, OS level synchronization primitives are faced with significant challenges due to the scheduling behavior of the underlying virtual machine monitor. Operations that are ensured to last only a short amount of time on real hardware, are capable of taking considerably longer when running virtualized. This change in assumptions has significant impact when an OS is executing inside a critical region that is protected by a spinlock. The interaction between OS level spinlocks and VMM scheduling is known as the Lock Holder Preemption problem and has a significant impact on overall VM performance. However, with the use of ticket locks instead of generic spinlocks, virtual environments must also contend with waiters being preempted before they are able to acquire the lock. This has the effect of blocking access to a lock, even if the lock itself is available. We identify this scenario as the Lock Waiter Preemption problem. In order to solve both problems we introduce Preemptable Ticket spinlocks, a new locking primitive that is designed to enable a VM to always make forward progress by relaxing the ordering guarantees offered by ticket locks. We show that the use of Preemptable Ticket spinlocks improves VM performance by 5.32X on average, when running on a non paravirtual VMM, and by 7.91X when running on a VMM that supports a paravirtual locking interface, when executing a set of microbenchmarks as well as a realistic e-commerce benchmark.

References

  1. Hackbench, 2008. http://people.redhat.com/mingo/cfs-scheduler/tools/hackbench.c/.Google ScholarGoogle Scholar
  2. Ebizzy 0.30, 2009. http://sourceforge.net/projects/ebizzy/.Google ScholarGoogle Scholar
  3. Kernbench 0.50, 2009. http://freecode.com/projects/kernbench.Google ScholarGoogle Scholar
  4. Dell dvd store database test suite 2.1, December 2010. http://linux.dell.com/dvdstore/.Google ScholarGoogle Scholar
  5. Chen, P. M., and Noble, B. D. When virtual is better than real. In The 8th Workshop on Hot Topics in Operating Systems (HotOS-VIII) (2001). Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Friebel, T. How to deal with lock-holder preemption. Presented at the Xen Summit North America, July 2008.Google ScholarGoogle Scholar
  7. He, B., Scherer, W., and Scott, M. Preemption adaptivity in time-published queue-based spin locks. In High Performance Computing HiPC 2005, D. Bader, M. Parashar, V. Sridhar, and V. Prasanna, Eds., vol. 3769 of Lecture Notes in Computer Science. Springer Berlin / Heidelberg, 2005, pp. 7--18. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. McKenney, P., and Slingwine, J. Read-copy update: Using execution history to solve concurrency problems. In Parallel and Distributed Computing and Systems (1998), pp. 509--518.Google ScholarGoogle Scholar
  9. Mellor-Crummey, J., and Scott, M. Algorithms for scalable synchronization on shared-memory multiprocessors. ACM Transactions on Computer Systems (TOCS) 9, 1 (1991), 21--65. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Mellor-Crummey, J., and Scott, M. Synchronization without contention. ACM SIGPLAN Notices 26, 4 (1991), 269--278. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Ousterhout, J. Scheduling techniques for concurrent systems. In Proceedings of the 3rd International Conference on Distributed Computing Systems (1982), pp. 22--30.Google ScholarGoogle Scholar
  12. Raghavendra, K., and Fitzhardinge, J. Paravirtualized ticket spinlocks, May 2012.Google ScholarGoogle Scholar
  13. Riel, R. v. Directed yield for pause loop exiting, 2011.Google ScholarGoogle Scholar
  14. Sukwong, O., and Kim, H. S. Is co-scheduling too expensive for smp vms? In Proceedings of the sixth conference on Computer systems (New York, NY, USA, 2011), EuroSys '11, ACM, pp. 257--272. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Uhlig, V., LeVasseur, J., Skoglund, E., and Dannowski, U. Towards scalable multiprocessor virtual machines. In Proceedings of the 3rd conference on Virtual Machine Research And Technology Symposium - Volume 3 (Berkeley, CA, USA, 2004), VM'04, USENIX Association, pp. 4--4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. VMware, I. Vmware(r) vsphere(tm): The cpu scheduler in vmware esx(r) 4.1, 2010.Google ScholarGoogle Scholar
  17. Wells, P. M., Chakraborty, K., and Sohi, G. S. Hardware support for spin management in overcommitted virtual machines. In Proceedings of the 15th international conference on Parallel architectures and compilation techniques (New York, NY, USA, 2006), PACT '06, ACM, pp. 124--133. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Weng, C., Liu, Q., Yu, L., and Li, M. Dynamic adaptive scheduling for virtual machines. In Proceedings of the 20th international symposium on High performance distributed computing (New York, NY, USA, 2011), HPDC '11, ACM, pp. 239--250. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Zhang, L., Chen, Y., Dong, Y., and Liu, C. Lock-visor: An efficient transitory co-scheduling for mp guest. In Proceedings of the 41st International Conference on Parallel Processing (Pittsburgh, PA, USA, 2012), pp. 88--97. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Preemptable ticket spinlocks: improving consolidated performance in the cloud

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

  • Published in

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 48, Issue 7
    VEE '13
    July 2013
    194 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2517326
    Issue’s Table of Contents
    • cover image ACM Conferences
      VEE '13: Proceedings of the 9th ACM SIGPLAN/SIGOPS international conference on Virtual execution environments
      March 2013
      210 pages
      ISBN:9781450312660
      DOI:10.1145/2451512

    Copyright © 2013 ACM

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 16 March 2013

    Check for updates

    Qualifiers

    • research-article

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!