Skip to main content

Predictive Transaction Scheduling for Alleviating Lock Thrashing

  • Conference paper
  • First Online:
Database Systems for Advanced Applications (DASFAA 2020)

Part of the book series: Lecture Notes in Computer Science ((LNISA,volume 12112))

Included in the following conference series:

  • 2869 Accesses

Abstract

To improve the performance for high-contention workloads, modern main-memory database systems seek to design efficient lock managers. However, OLTP engines adopt the classic FCFS strategy to process operations, where the generated execution order does not take current and future conflicts into consideration. In this case, lock dependencies will happen more frequently and thus resulting in high transaction waiting time, referred to as lock thrashing, which is proved to be the main bottleneck of lock-based concurrency control mechanisms. In this paper, we present a transaction scheduler that generates efficient execution order to alleviate the lock thrashing issue. To proactively resolve conflicts, LOTAS predicts which data will be accessed by following operations through building Markov-based prediction graphs. Then LOTAS uses the information to schedule transactions by judging whether a transaction needs to be deferred to acquire locks. Experimental results demonstrate that LOTAS can significantly reduce the lock waiting time and improves the throughput up to 4.8x than the classic FCFS strategy under highly contended workloads.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Dbx1000. https://github.com/yxymit/DBx1000

  2. Bernstein, P.A., Newcomer, E.: Principles of Transaction Processing for Systems Professionals. Morgan Kaufmann, Burlington (1996)

    MATH  Google Scholar 

  3. Ding, B., Kot, L., Gehrke, J.: Improving optimistic concurrency control through transaction batching and operation reordering. PVLDB 12(2), 169–182 (2018)

    Google Scholar 

  4. Faleiro, J.M., Abadi, D., Hellerstein, J.M.: High performance transactions via early write visibility. PVLDB 10(5), 613–624 (2017)

    Google Scholar 

  5. Ganapathi, A., Kuno, H.A., et al.: Predicting multiple metrics for queries: better decisions enabled by machine learning. In: ICDE, pp. 592–603 (2009)

    Google Scholar 

  6. Guo, J., Chu, J., Cai, P., Zhou, M., Zhou, A.: Low-overhead paxos replication. Data Sci. Eng. 2(2), 169–177 (2017). https://doi.org/10.1007/s41019-017-0039-z

    Article  Google Scholar 

  7. Gupta, C., Mehta, A., Dayal, U.: PQR: predicting query execution times for autonomous workload management. In: ICAC, pp. 13–22 (2008)

    Google Scholar 

  8. Haritsa, J.R., Carey, M.J., Livny, M.: Dynamic real-time optimistic concurrency control. In: RTSS, pp. 94–103 (1990)

    Google Scholar 

  9. Harizopoulos, S., Abadi, D.J., Madden, S., Stonebraker, M.: OLTP through the looking glass, and what we found there. In: SIGMOD, pp. 981–992 (2008)

    Google Scholar 

  10. Huang, J., Mozafari, B., et al.: A top-down approach to achieving performance predictability in database systems. In: SIGMOD, pp. 745–758 (2017)

    Google Scholar 

  11. Jung, H., Han, H., Fekete, A.D., Heiser, G., Yeom, H.Y.: A scalable lock manager for multicores. In: SIGMOD, pp. 73–84 (2013)

    Google Scholar 

  12. Ma, L., Aken, D.V., Hefny, A., et al.: Query-based workload forecasting for self-driving database management systems. In: SIGMOD, pp. 631–645 (2018)

    Google Scholar 

  13. McWherter, D.T., Schroeder, B., Ailamaki, A., et al.: Priority mechanisms for OLTP and transactional web applications. In: ICDE, pp. 535–546 (2004)

    Google Scholar 

  14. McWherter, D.T., Schroeder, B., Ailamaki, A., et al.: Improving preemptive prioritization via statistical characterization of OLTP locking. In: ICDE, pp. 446–457 (2005)

    Google Scholar 

  15. Mu, S., Cui, Y., Zhang, Y., Lloyd, W., Li, J.: Extracting more concurrency from distributed transactions. In: OSDI, pp. 479–494 (2014)

    Google Scholar 

  16. Pavlo, A.: What are we doing with our lives?: nobody cares about our concurrency control research. In: SIGMOD, p. 3 (2017)

    Google Scholar 

  17. Pavlo, A., Jones, E.P.C., Zdonik, S.B.: On predictive modeling for optimizing transaction execution in parallel OLTP systems. PVLDB 5(2), 85–96 (2011)

    Google Scholar 

  18. Prasaad, G., Cheung, A., Suciu, D.: Improving high contention OLTP performance via transaction scheduling. CoRR, abs/1810.01997 (2018)

    Google Scholar 

  19. Ren, K., Faleiro, J.M., Abadi, D.J.: Design principles for scaling multi-core OLTP under high contention. In: SIGMOD, pp. 1583–1598 (2016)

    Google Scholar 

  20. Ren, K., Thomson, A., Abadi, D.J.: Lightweight locking for main memory database systems. PVLDB 6(2), 145–156 (2012)

    Google Scholar 

  21. Sapia, C.: PROMISE: predicting query behavior to enable predictive caching strategies for OLAP systems. In: Kambayashi, Y., Mohania, M., Tjoa, A.M. (eds.) DaWaK 2000. LNCS, vol. 1874, pp. 224–233. Springer, Heidelberg (2000). https://doi.org/10.1007/3-540-44466-1_22

    Chapter  Google Scholar 

  22. Shasha, D.E., Llirbat, F., Simon, E., et al.: Transaction chopping: algorithms and performance studies. ACM Trans. Database Syst. 20(3), 325–363 (1995)

    Article  Google Scholar 

  23. Thomson, A., Diamond, T., Weng, S., et al.: Calvin: fast distributed transactions for partitioned database systems. In: SIGMOD, pp. 1–12 (2012)

    Google Scholar 

  24. Tian, B., Huang, J., Mozafari, B., Schoenebeck, G.: Contention-aware lock scheduling for transactional databases. PVLDB 11(5), 648–662 (2018)

    Google Scholar 

  25. Wang, T., Kimura, H.: Mostly-optimistic concurrency control for highly contended dynamic workloads on a thousand cores. PVLDB 10(2), 49–60 (2016)

    Google Scholar 

  26. Wang, Z., Mu, S., Cui, Y., Yi, H., Chen, H., Li, J.: Scaling multicore databases via constrained parallel execution. In: SIGMOD, pp. 1643–1658 (2016)

    Google Scholar 

  27. Xie, C., Su, C., Littley, C., Alvisi, L., Kapritsos, M., Wang, Y.: High-performance ACID via modular concurrency control. In: SOSP, pp. 279–294 (2015)

    Google Scholar 

  28. Yan, C., Cheung, A.: Leveraging lock contention to improve OLTP application performance. PVLDB 9(5), 444–455 (2016)

    Google Scholar 

  29. Yu, X., Bezerra, G., Pavlo, A., et al.: Staring into the abyss: an evaluation of concurrency control with one thousand cores. PVLDB 8(3), 209–220 (2014)

    Google Scholar 

  30. Zhang, T., Tomasic, A., Sheng, Y., Pavlo, A.: Performance of OLTP via intelligent scheduling. In: ICDE, pp. 1288–1291 (2018)

    Google Scholar 

Download references

Acknowledgement

This work is partially supported by National Key R&D Program of China (2018YFB1003404), and NSFC under grant numbers 61972149, and ECNU Academic Innovation Promotion Program for Excellent Doctoral Students. The corresponding author is Peng Cai. We thank anonymous reviewers for their very helpful comments.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Peng Cai .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Wang, D., Cai, P., Qian, W., Zhou, A. (2020). Predictive Transaction Scheduling for Alleviating Lock Thrashing. In: Nah, Y., Cui, B., Lee, SW., Yu, J.X., Moon, YS., Whang, S.E. (eds) Database Systems for Advanced Applications. DASFAA 2020. Lecture Notes in Computer Science(), vol 12112. Springer, Cham. https://doi.org/10.1007/978-3-030-59410-7_9

Download citation

Publish with us

Policies and ethics