skip to main content
research-article

Interleaving with coroutines: a practical approach for robust index joins

Published:01 October 2017Publication History
Skip Abstract Section

Abstract

Index join performance is determined by the efficiency of the lookup operation on the involved index. Although database indexes are highly optimized to leverage processor caches, main memory accesses inevitably increase lookup runtime when the index outsizes the last-level cache; hence, index join performance drops. Still, robust index join performance becomes possible with instruction stream interleaving: given a group of lookups, we can hide cache misses in one lookup with instructions from other lookups by switching among their respective instruction streams upon a cache miss.

In this paper, we propose interleaving with coroutines for any type of index join. We showcase our proposal on SAP HANA by implementing binary search and CSB+-tree traversal for an instance of index join related to dictionary compression. Coroutine implementations not only perform similarly to prior interleaving techniques, but also resemble the original code closely, while supporting both interleaved and non-interleaved execution. Thus, we claim that coroutines make interleaving practical for use in real DBMS codebases.

References

  1. C# Reference. https://msdn.microsoft.com/en-us/library/9k7k7cf0.aspx {Online; accessed 14-August-2017}.Google ScholarGoogle Scholar
  2. Generators. Python Wiki. https://wiki.python.org/ moin/Generators {Online; accessed 14-August-2017}.Google ScholarGoogle Scholar
  3. Programming languages --- C++ extensions for coroutines.Google ScholarGoogle Scholar
  4. Transaction Processing Performance Council. TPC-DS benchmark version 2.3.0. http://www.tpc.org/tpcds/ {Online; accessed 14-August-2017}.Google ScholarGoogle Scholar
  5. A. Ailamaki, D. J. DeWitt, M. D. Hill, and D. A. Wood. DBMSs on a modern processor: where does time go? In Proc. VLDB, pages 266--277, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. Chen, A. Ailamaki, P. B. Gibbons, and T. C. Mowry. Improving hash join performance through prefetching. ACM Trans. Database Syst., 32(3), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. Colgan. Oracle Database In-Memory. Technical report, Oracle Corporation, 2015. http://www.oracle.com/technetwork/database/in-memory/overview/twp-oracle-database-in-memory-2245633.html.Google ScholarGoogle Scholar
  8. M. E. Conway. Design of a separable transition-diagram compiler. Commun. ACM, 6(7):396--408, 1963. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. F. Färber, N. May, W. Lehner, P. Große, I. Müller, H. Rauhe, and J. Dees. The SAP HANA Database - an architecture overview. IEEE Data Eng. Bull., 35(1):28--33, 2012.Google ScholarGoogle Scholar
  10. S. Idreos, F. Groffen, N. Nes, S. Manegold, S. Mullender, and M. Kersten. MonetDB: two decades of research in column-oriented database architectures. IEEE Data Eng. Bull., 35(1):40--45, 2012.Google ScholarGoogle Scholar
  11. Intel Corporation. Intel® 64 and IA-32 Architectures Optimization Reference Manual, June 2016.Google ScholarGoogle Scholar
  12. A. Kemper and T. Neumann. HyPer: a hybrid OLTP & OLAP main memory database system based on virtual memory snapshots. In Proc. ICDE, pages 195--206, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. Kerrisk. The Linux Programming Interface: A Linux and UNIX System Programming Handbook. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. Kim, J. Chhugani, N. Satish, E. Sedlar, A. D. Nguyen, T. Kaldewey, V. W. Lee, S. A. Brandt, and P. Dubey. FAST: fast architecture sensitive tree search on modern CPUs and GPUs. In Proc. SIGMOD, pages 339--350, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. O. Kocberber, B. Falsafi, and B. Grot. Asynchronous memory access chaining. PVLDB, 9(4):252--263, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. M. D. Lam, E. E. Rothberg, and M. E. Wolf. The cache performance and optimizations of blocked algorithms. In Proc. ASPLOS, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. H. Lang, T. Mühlbauer, F. Funke, P. Boncz, T. Neumann, and A. Kemper. Data Blocks: hybrid OLTP and OLAP on compressed storage using both vectorization and compilation. Proc. SIGMOD, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. P.-A. Larson, C. Clinciu, C. Fraser, E. N. Hanson, M. Mokhtar, M. Nowakiewicz, V. Papadimos, S. L. Price, S. Rangarajan, R. Rusanu, and M. Saubhasik. Enhancements to SQL Server column stores. In Proc. SIGMOD, pages 1159--1168, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. P.-A. Larson, C. Clinciu, E. N. Hanson, A. Oks, S. L. Price, S. Rangarajan, A. Surna, and Q. Zhou. SQL Server column store indexes. Proc. SIGMOD, pages 1177--1184, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. S. Manegold, P. A. Boncz, and M. L. Kersten. Optimizing database architecture for the new bottleneck: memory access. VLDB Journal, 9(3):231--246, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J. Marusarz. Understanding how general exploration works in Intel VTune Amplifier XE, 2015. https://software.intel.com/en-us/articles/understanding-how-general-exploration-works-in-intel-vtune-amplifier-xe {Online; accessed 14-August-2017}.Google ScholarGoogle Scholar
  22. T. J. McCabe. A complexity measure. IEEE Trans. Softw. Eng., 2(4):308--320, July 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. J. Melton. Advanced SQL 1999: Understanding Object-Relational, and Other Advanced Features. Elsevier Science Inc., 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. A. L. D. Moura and R. Ierusalimschy. Revisiting coroutines. ACM Trans. Program. Lang. Syst., 31(2):6:1--6:31, Feb. 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. I. Müller, C. Ratsch, and F. Färber. Adaptive string dictionary compression in in-memory column-store database systems. In Proc. EDBT, pages 283--294, 2014.Google ScholarGoogle Scholar
  26. M. Poess and D. Potapov. Data compression in Oracle. Proc. VLDB, pages 937--947, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. V. Raman, G. Attaluri, R. Barber, N. Chainani, D. Kalmuk, V. KulandaiSamy, J. Leenstra, S. Lightstone, S. Liu, G. M. Lohman, T. Malkemus, R. Mueller, I. Pandis, B. Schiefer, D. Sharpe, R. Sidle, A. Storm, and L. Zhang. DB2 with BLU Acceleration: so much more than just a column store. PVLDB, 6(11):1080--1091, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. J. Rao and K. A. Ross. Making B+-trees cache conscious in main memory. In Proc. ACM SIGMOD, pages 475--486, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. RethinkDB Team. Improving a large C++ project with coroutines, 2010. https://www.rethinkdb.com/blog/improving-a-large-c-project-with-coroutines/ {Online; accessed 14-August-2016}.Google ScholarGoogle Scholar
  30. M. E. Russinovich, D. A. Solomon, and A. Ionescu. Windows Internals, Part 1: Covering Windows Server 2008 R2 and Windows 7. Microsoft Press, 6th edition, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. J. Zhou, J. Cieslewicz, K. A. Ross, and M. Shah. Improving database performance on simultaneous multithreading processors. In Proc. VLDB, pages 49--60, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. J. Zhou and K. A. Ross. Buffering accesses to memory-resident index structures. In Proc. VLDB, pages 405--416, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library

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 Proceedings of the VLDB Endowment
    Proceedings of the VLDB Endowment  Volume 11, Issue 2
    October 2017
    176 pages
    ISSN:2150-8097
    Issue’s Table of Contents

    Publisher

    VLDB Endowment

    Publication History

    • Published: 1 October 2017
    Published in pvldb Volume 11, Issue 2

    Qualifiers

    • research-article

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader