Abstract
We present the design and evaluation of a Datalog engine for execution in Graphics Processing Units (GPUs). The engine evaluates recursive and non-recursive Datalog queries using a bottom-up approach based on typical relational operators. It includes a memory management scheme that automatically swaps data between memory in the host platform (a multicore) and memory in the GPU in order to reduce the number of memory transfers. To evaluate the performance of the engine, four Datalog queries were run on the engine and on a single CPU in the multicore host. One query runs up to 200 times faster on the (GPU) engine than on the CPU.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
CUDA, C Best Practices Guide. http://docs.nvidia.com/cuda/cuda-c-best-practices-guide/index.html
CUDA, C Programming Guide. http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html
Datalog by the MITRE Corporation. http://datalog.sourceforge.net/
Red Fox: A Compilation Environment for Data Warehousing. http://gpuocelot.gatech.edu/projects/red-fox-a-compilation-environment-for-data-warehousing/
Thrust: A Parallel Template Library. http://thrust.github.io/
Abiteboul, S., et al.: Foundations of Databases. Addison-Wesley, Boston (1995)
Afrati, F.N., Borkar, V., Carey, M., Polyzotis, N., Ullman, J.D.: Cluster Computing, Recursion and Datalog. In: de Moor, O., Gottlob, G., Furche, T., Sellers, A. (eds.) Datalog 2010. LNCS, vol. 6702, pp. 120–144. Springer, Heidelberg (2011)
Beeri, C., Ramakrishnan, R.: On the power of magic. J. Log. Program. 10(3–4), 255–299 (1991)
Bravenboer, M., Smaragdakis, Y.: Strictly declarative specification of sophisticated points-to analyses. In: OOPSLA, pp. 243–262 (2009)
Costa, V.S., et al.: The YAP prolog system. TPLP 12(1–2), 5–34 (2012)
Diamos, G., et al.: Efficient relational algebra algorithms and data structures for GPU. Technical report, Georgia Institute of Technology (2012)
Diamos G. et al.: Relational algorithms for multi-bulk-synchronous processors. In: 18th Symposium on Principles and Practice of Parallel Programming (2013)
Dong, G., Jianwen, S., Topor, R.W.: Nonrecursive incremental evaluation of datalog queries. Ann. Math. Artif. Intell. 14(2–4), 187–223 (1995)
Green, T.J., Aref, M., Karvounarakis, G.: LogicBlox, Platform and Language: A Tutorial. In: Barceló, P., Pichler, R. (eds.) Datalog 2.0 2012. LNCS, vol. 7494, pp. 1–8. Springer, Heidelberg (2012)
Harris, M., et al.: Parallel prefix sum (scan) with CUDA. In: Nguyen, H. (ed.) GPU Gems 3, pp. 851–876. Addison Wesley, Boston (2007)
He, B., et al.: Relational joins on graphics processors. In: SIGMOD Conference, pp. 511–524 (2008)
He, B., et al.: Relational query coprocessing on graphics processors. ACM Trans. Database Syst. (TODS) 34(4), 21:1–21:39 (2009)
Huang, S.S., et al.: Datalog and emerging applications: an interactive tutorial. In: SIGMOD Conference. pp. 1213–1216 (2011)
Loo, B.T., et al.: Declarative networking: language, execution and optimization. In: SIGMOD Conference, pp. 97–108 (2006)
Marczak W.R., et al.: Secureblox: customizable secure distributed data processing. In: SIGMOD Conference, pp. 723–734 (2010)
Musser, D.R., Derge, G.J., Saini, A.: STL Tutorial and Reference Guide: C++ Programming With The Standard Template Library, 2nd edn. Addison-Wesley Longman Publishing Co. Inc., Boston (2001)
Rao, J., Ross, K.A.: Cache conscious indexing for decision-support in main memory. In: 25th VLDB Conference, San Francisco., CA, USA, pp. 78–89 (1999)
Shen, W., et al.: Declarative information extraction using datalog with embedded extraction predicates. In: VLDB, pp. 1033–1044 (2007)
Swift, T., Warren, D.S.: Xsb: Extending prolog with tabled logic programming. TPLP 12(1–2), 157–187 (2012)
Tekle, K.T., Liu, Y.A.: More efficient datalog queries: subsumptive tabling beats magic sets. In: SIGMOD Conference, pp. 661–672 (2011)
Ullman, J.D.: Principles of Database and Knowledge-Base Systems, vol. 1. Computer Science Press, Beijing (1988)
Ullman, J.D.: Principles of Database and Knowledge-Base Systems, vol. 2. Computer Science Press, Beijing (1989)
Valiant, L.G.: A bridging model for parallel computation. Commun. ACM 33(8), 103–111 (1990)
Wu, H., et al.: Kernel weaver: Automatically fusing database primitives for efficient GPU computation. In: 45th International Symposium on Microarchitecture (2012)
Wu, H., et al.: Optimizing data warehousing applications for GPUs using kernel fusion/fission. In: IEEE 26th International Parallel and Distributed Processing Symposium Workshops and PhD Forum (2012)
Young, J., et al.: Satisfying data-intensive queries using GPU clusters. In: 2nd Annual Workshop on High-Performance Computing meets Databases (2012)
Acknowledgments
CMA thanks the support during his MSc studies from: the University of Porto, the Centre for Research and Postgraduate Studies of the National Polytechnic Institute (CINVESTAV-IPN) of Mexico, and the Mexican Council of Science and Technology (CONACyT). ICD and VSC were partially supported by: the European Regional Development Fund (ERDF), COMPETE Programme; the Portuguese Foundation for Science and Technology (FCT), project LEAP FCOMP-01-0124-FEDER-015008; and project ABLe PTDC/EEI-SII/2094/2012.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this paper
Cite this paper
Martínez-Angeles, C.A., Dutra, I., Costa, V.S., Buenabad-Chávez, J. (2014). A Datalog Engine for GPUs. In: Hanus, M., Rocha, R. (eds) Declarative Programming and Knowledge Management. INAP WLP WFLP 2013 2013 2013. Lecture Notes in Computer Science(), vol 8439. Springer, Cham. https://doi.org/10.1007/978-3-319-08909-6_10
Download citation
DOI: https://doi.org/10.1007/978-3-319-08909-6_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-08908-9
Online ISBN: 978-3-319-08909-6
eBook Packages: Computer ScienceComputer Science (R0)