skip to main content
10.1145/2791347.2791379acmotherconferencesArticle/Chapter ViewAbstractPublication PagesssdbmConference Proceedingsconference-collections
research-article

Extending database task schedulers for multi-threaded application code

Published:29 June 2015Publication History

ABSTRACT

Modern databases can run application logic defined in stored procedures inside the database server to improve application speed. The SQL standard specifies how to call external stored routines implemented in programming languages, such as C, C++, or JAVA, to complement declarative SQL-based application logic. This is beneficial for scientific and analytical algorithms because they are usually too complex to be implemented entirely in SQL. At the same time, database applications like matrix calculations or data mining algorithms benefit from multi-threading to parallelize compute-intensive operations. Multi-threaded application code, however, introduces a resource competition between the threads of applications and the threads of the database task scheduler. In this paper, we show that multi-threaded application code can render the database's workload scheduling ineffective and decrease the core throughput of the database by up to 50%. We present a general approach to address this issue by integrating shared memory programming solutions into the task schedulers of databases. In particular, we describe the integration of OpenMP into databases. We implement and evaluate our approach using SAP HANA. Our experiments show that our integration does not introduce overhead, and can improve the throughput of core database operations by up to 15%.

References

  1. SAP HANA Predictive Analysis Library (PAL), 2015. http://help.sap.com/hana/SAP_HANA_Predictive_Analysis_Library_PAL_en.pdf.Google ScholarGoogle Scholar
  2. SAP HANA SQLScript Reference, 2015. http://help.sap.com/hana/sap_hana_sql_script_reference_en.pdf.Google ScholarGoogle Scholar
  3. D. Battré et al. Nephele/PACTs: a programming model and execution framework for web-scale analytical processing. In Proc. ACM SoCC, pages 119--130, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. Carney et al. Operator scheduling in a data stream manager. In Proc. VLDB, pages 838--849, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. R. Chaiken et al. SCOPE: Easy and Efficient Parallel Processing of Massive Data Sets. Proc. VLDB Endow., 1(2):1265--1276, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. L. Dagum et al. OpenMP: an industry standard API for shared-memory programming. IEEE Comput. Sci. Eng, 5(1):46--55, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. A. Eisenberg. New standard for stored procedures in SQL. SIGMOD Rec., 25(4):81--88, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. F. Färber et al. The SAP HANA database -- an architecture overview. IEEE Data Eng. Bull., 35(1):28--33, 2012.Google ScholarGoogle Scholar
  9. U. Fischer et al. Towards integrated data analytics: Time series forecasting in DBMS. Datenbank-Spektrum, 13(1):45--53, 2013.Google ScholarGoogle ScholarCross RefCross Ref
  10. E. Friedman et al. SQL/MapReduce: A practical approach to self-describing, polymorphic, and parallelizable user-defined functions. Proc. VLDB Endow., 2(2):1402--1413, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. P. Große et al. Bridging two worlds with RICE integrating R into the SAP in-memory computing engine. PVLDB, 4(12):1307--1317, 2011.Google ScholarGoogle Scholar
  12. G. Harrison. MySQL stored procedures: Next big thing or relic of the past? Linux Journal, 2007(164). Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. Jaedicke et al. On Parallel Processing of Aggregate and Scalar Functions in Object-relational DBMS. In Proc. SIGMOD, pages 379--389, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. D. Kernert et al. Slacid - sparse linear algebra in a column-oriented in-memory database system. In Proc. SSDBM, pages 11:1--11:12, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. W. Kim et al. Multicore desktop programming with intel threading building blocks. IEEE Softw., 28(1):23--31, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. V. Leis et al. Morsel-Driven Parallelism: A NUMA-Aware Query Evaluation Framework for the Many-Core Age. In Proc. SIGMOD, pages 743--754, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. V. Linnemann et al. Design and implementation of an extensible database management system supporting user defined data types and functions. In Proc. VLDB, pages 294--305, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. I. Psaroudakis et al. Task Scheduling for Highly Concurrent Analytical and Transactional Main-Memory Workloads. In ADMS, pages 36--45, 2013.Google ScholarGoogle Scholar
  19. I. Psaroudakis et al. Scaling up mixed workloads: a battle of data freshness, flexibility, and scheduling. In Proc. TPCTC, 2014.Google ScholarGoogle Scholar
  20. V. Raman et al. DB2 with BLU Acceleration: So much more than just a column store. volume 6, pages 1080--1091, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. Snir. MPI--the Complete Reference: The MPI core, volume 1. MIT press, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. H. Sutter. The free lunch is over: A fundamental turn toward concurrency in software. Dr. Dobb's Journal, 30(3), 2005.Google ScholarGoogle Scholar
  23. M. Wilhelm et al. Mass-spectrometry-based draft of the human proteome. Nature, 509(7502):582--587, 2014.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Extending database task schedulers for multi-threaded application code

                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
                • Published in

                  cover image ACM Other conferences
                  SSDBM '15: Proceedings of the 27th International Conference on Scientific and Statistical Database Management
                  June 2015
                  390 pages
                  ISBN:9781450337090
                  DOI:10.1145/2791347

                  Copyright © 2015 ACM

                  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 the author(s) 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: 29 June 2015

                  Permissions

                  Request permissions about this article.

                  Request Permissions

                  Check for updates

                  Qualifiers

                  • research-article

                  Acceptance Rates

                  Overall Acceptance Rate56of146submissions,38%

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader