Run-Time Performance Optimization of a Bigdata Query Language

Run-Time Performance Optimization of a Bigdata Query Language

Run-Time Performance Optimization of a BigData Query Language Yanbin Liu, Parijat Dube, Scott C. Gray IBM Watson Research Center Yorktown Heights, USA. ygliu,pdube,[email protected] ABSTRACT models supporting large-scale, parallel and efficient execu- JAQL is a query language for large-scale data that connects tion of queries on scale-out infrastructure. The MapRe- BigData analytics and MapReduce framework together. Also duce programming paradigm, first introduced by Google [10] an IBM product, JAQL's performance is critical for IBM In- provides a framework for large-scale parallel data process- foSphere BigInsights, a BigData analytics platform. In this ing. Apache Hadoop [1] is an open-source implementation paper, we report our work on improving JAQL performance of MapReduce. from multiple perspectives. We explore the parallelism of While highly scalable, MapReduce is notoriously difficult JAQL, profile JAQL for performance analysis, identify I/O to use. The Java API is tedious and requires programming as the dominant performance bottleneck, and improve JAQL expertise. Query languages like Apache Hive [17], Apache performance with an emphasis on reducing I/O data size and Pig [11] and JAQL [9] provide high-level abstraction to ex- increasing (de)serialization efficiency. With TPCH bench- press queries which are then compiled into low-level MapRe- mark on a simple Hadoop cluster, we report up to 2x perfor- duce jobs. mance improvements in JAQL with our optimization fixes. IBM InfoSphere BigInsights [4] is a platform for scalable processing of Big Data analytics applications in an enter- prise. BigInsights builds on top of open-source Hadoop by Categories and Subject Descriptors adding several features for cost effective management, pro- C.4 [Computer Systems Organization]: Performance of cessing and analysis of enterprise Big Data. Systems|Performance attributes JAQL [9] is an integral part of BigInsights where it pro- vides both the run time and an integration point for var- Keywords ious analytics including text analytics, statistical analysis, machine learning, and ad-hoc analysis. Figure 1 shows the BigInsights, JAQL, MapReduce, Multi-thread, I/O optimiza- BigInsights platform stack. BigInsights applications are exe- tion, Java performance cuted either entirely in JAQL or JAQL instantiates Hadoop MapReduce jobs for scalable query execution. In BigIn- 1. INTRODUCTION sights, JAQL also provides modules to connect to various The proliferation of cheaper technologies for collecting and data sources like local and distributed file systems, relational transmitting data of different modalities and formats from databases, NoSQL databases. Performance of BigInsights different sources such as sensors, cameras, Internet feeds, applications is integrally tied with the performance of JAQL social networks, mobile phones etc. has rendered the busi- and Hadoop run-time. ness world with vast amount of data. This plethora of data, if properly processed, can provide significant new insights for tracking markets, customers and business performance. Information management of such vast amount of Big Data is critical and technologies for efficient and cost-effective fil- learning Machine Analysis Analysis Analytics tering, storing and accessing of data are increasingly sought Statistical (R module)(R (SystemML) Streams, … Streams, (BigSheets) (Integration) (Integration) DB2, Netezza, DB2, Netezza, BigInsights Text after. Big Data [2] is typically characterized by having 4 analysisAd-Hoc Vs: high Volume, high Velocity, high Variety and Verac- Big SQL ity which is a measure of uncertainty in data. Processing of Big Data within reasonable time requires programming Jaql Jaql Jaql I/O Jaql Core Permission to make digital or hard copies of all or part of this work for personal or Operators Modules 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 cita- tion on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or re- File RDBMS publish, to post on servers or to redistribute to lists, requires prior specific permission DFS NoSQL System and/or a fee. Request permissions from [email protected]. ICPE’14, March 22–26, 2014, Dublin, Ireland. Copyright 2014 ACM 978-1-4503-2733-6/14/03 ...$15.00. Figure 1: BigInsights Architecture http://dx.doi.org/10.1145/2568088.2576800 . 239 BigInsights needs a fast run-time to improve performance clusters. With the release of IBM BigInsights 2.1 (itself a and needs an ability to run SQL queries. Big SQL is a Hadoop distribution) JAQL began to play a more important new and important component of BigInsights providing sup- role by acting as the query parallelization engine and exe- port for SQL queries execution. Big SQL server is multi- cution runtime for the Big SQL component and, as a result, threaded supporting multiple sessions and thus can exploit it was important to dramatically increase the performance performance scaling offered by multi-thread, multi-core sys- of JAQL, particularly when applied to the structured data tems. Since JAQL provides run-time environment for Bi- world of SQL. gInsights applications, the focus on run-time efficiency and The Big SQL component of BigInsights contains a so- support for multi-thread execution in JAQL is important phisticated SQL optimization and re-write engine that is for scalable execution of Big SQL and other multi-threaded responsible for taking modern, ANSI SQL, containing com- applications supported by BigInsights including IBM Info- plex constructs, such as windowed aggregates, common table Sphere DataStage [5], Tableau [6], and IBM BigSheets [3]. expressions, and subqueries, and optimizing the queries via Our work improves JAQL run-time performance in multi- a number of re-write steps. Examples of such optimization thread, multi-core environments through: (i) Enabling run- include: time support for multi-threaded applications running on top of JAQL, and (ii) Speeding-up query execution time by iden- • Decorrelation of subqueries tifying performance bottlenecks and fixing them. • Lifting of common, repeated queries or query frag- Section 2 provides background information on query pro- ments into common table expressions cessing in BigInsights. Various run-time performance issues of JAQL are highlighted in Section 3. Our solution for en- • Identifying queries that cannot benefit from parallel abling multi-thread execution in JAQL run-time is discussed execution in Section 4. Experiments showcasing improvements in Big SQL/JAQL run-time performance as a result of our opti- • Mapping of certain SQL constructs such as interval mizations are presented in Section 5. Related work is cov- arithmetic into function calls ered in Section 6 followed by conclusion and future work in Section 7. The output of the query optimization engine is a re-written SQL query that is then passed to JAQL for processing, at 2. BACKGROUND which point JAQL performs the following steps: JAQL [9] consists of three major components as shown in 1. The SQL statement is immediately re-written into an Figure 2: a scripting language, a compiler and a runtime equivalent JAQL expression. This expression is writ- component for MapReduce framework to transparently ex- ten in the same fashion that a user of JAQL would have ploit parallelism. JAQL scripting language is designed for written the query { that is, it contains no indication analyzing complex/nested semi-structured data. It provides of how the query should be executed, but is simply an a flexible data model based on JSON (Java Script Object expression of the query that is to be performed. Notation), an easy-to-extend modular design including first- class functions and a set of syntax for supporting control- 2. The JAQL rewriter then performs a large number of flow statements and SQL queries. JAQL compiler is the query re-writes and optimizations, which includes ba- central-piece that detects parallelism in a JAQL script and sic activities such as simplifying expressions (e.g. 2 + translates it into a set of MapReduce jobs. JAQL runtime 2 will be simplified to 4) to more complex re-writes, component for MapReduce framework defines map, com- such as determining whether or not the query can be bine, reduce, (de)serialization and etc. functions that will parallelized and, if so, how to approach the paralleliza- be executed in the MapReduce framework. tion. Some of these optimizations are directed by the query rewriter via hints that were passed into JAQL via the original SQL statement. JAQL script 3. The final result of all of these optimizations is a valid Compiler JAQL script. In many cases, this script will be de- (Parser, Optimizer, Rewriter) composed into a series of explicit MapReduce jobs to Low Level Scripting/Query Language achieve the end goal of executing the query. While JAQL has been capable of the majority of the func- Evaluator tionality described above for a number of years, in order to utilize it as the runtime for Big SQL, it was necessary to Local Execution MapReduce Job (with JAQL runtime) optimize a number of aspects of the language. MapReduceMapReduce 3. JAQL PERFORMANCE frameworkframework such such as as HadoopHadoop 3.1 Parallelism JAQL performance, which includes the performance of Figure 2: JAQL components both JAQL compiler and JAQL MapReduce runtime, can be influenced by multiple factors. As the multi-core, multi- JAQL programming language has been utilized for a num- processor become the main trend today, the first factor we ber of years for developing large scale analytics on Hadoop look at is the parallelism. As we discussed above, by design, 240 JAQL already explores parallelism by transparently gener- JAQL runtime defines the serialization and de-serialization ating MapReduce jobs that can be executed in parallel. In functions. Inside Hadoop, when data is written to and read this paper, we explore more parallelism by analyzing the from HDFS and local disk or when the data is merged and multi-layer software stack of JAQL.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us