Managing Intra-Operator Parallelism in Parallel Database Systems*

Managing Intra-Operator Parallelism in Parallel Database Systems*

Managing Intra-operator Parallelism in Parallel Database Systems* Manish Mehta David J. Dewitt IBM Alamaden Research Center Computer Sciences Department San Jose, CA, USA. University of Wisconsin-Madison [email protected] [email protected] Abstract dat,a. However, it is not evident how intra-operat,or parallelism should be used in a multi-query environ- Int#ra-operator (or partitioned) parallelism is a rnent, where multiple concurrent queries are cont,end- well-established mechanism for achieving high per- ing for system resources. Selecting low degrees of op- formance in parallel database systems. How- era.tor parallelism can lead to underutilizat,ion of the ever, the problem of how to exploit intra-operator system and reduced performance. On the other hand. parallelism in a multi-query environment is not high degrees of parallelism can give “too many” re- well underst,ood. This paper presents a detailed sources to a single query and lead t.o high resource performance evaluation of several algorithms for contention. This paper explores this problem of deter- managing intra-operator parallelism in a parallel mining the %ppropriat,e” degree of intra-operator par- database system. A dynamic scheme based on the allelism for queries in a multi-query pa.rallel dat.aba.se concept of matching the ra.te of flow of tuples be- system. tween operat,ors is shown to perform well on a va- T.here are two important issues that need to be ad- riety of workloads and configurations. dressed. First, for each query, t,he algorithm must de- termine the degree of parallelism of each operator in the query plan. Second, the algorithm must a.ssign 1 Introduction specific processors to execute each operat.or inst,ance. Highly-parallel databa.se systems are increasingly be- The degree of parallelism of an operator should be ing used for large-scale database applications. Exam- selected such that the cost of starting and terminat- ples of these systems include products like Teradata ing all of the instances of t,he operat,or is more than DBC/1012 [26], Tandem Hima,laya [13], IBM SP1/2 offset, by the performance improvement due t,o paral- [16], and research prot,otypes like Bubba [8], Ga.mma lelism. Since startup and termination costs are a func- [7], and Volcano [12]. Inlru-operafor parallelism (or t,ion of the configuration and workload, the degree of partitioned parallelism [4]) is a well-established tech- parallelism should change for different workloads and nique for increasing performance in these systems. Ba- configurations. In this paper, we present, several al- sically, by allowing the input data to be partitioned gorithms for determining the degree of parallelism of among multiple processors and memories, this tech- operat,ors. A detailed performance evaluation shows nique enables a database operator to be split into many that a new dynamic algorit,hm based on t,he concept, independent operators each working on a part of the of matching the rat,e of flow of tuples bet.ween oper- at,ors provides good performance across a variet,y of *This research was performed while the first author was at workloads and configurations. the University of Wisconsin-Madison and was supported by an IBM Research Initiation Grant. The primary objective of an algorithm for assigning Pwmission to copy without jet all OT part of this material is processors to operators is load balancing. Processors granted provided that the copies are not made or distributed for should be assigned t#ooperators such that, the workload direct commercial advantage, the VLDB copyright notice and is uniformly distributed and all the nodes are equally the title of the publication and its date appear, and notice is utilized. This paper presents several alternative meth- given that copying is by permission of the ,veery Large Data Base Endowment. To copy otherwise, or to republish, requires a jee ods of assigning processors to operators. The results and/or special permission jvom the Endowment. show that algorithms that utilize information about Proceedings of the Zlst VLDB Conference the system workload in assignment decisions perform Zurich, Swizerland, 1995 better than algorithms t,hat assign processors stati- 382 tally. also has the highest startup and termination costs a,nd The rest, of the paper is organized as follows. Sec- leads to the highest resource contention. Moreover, tion 2 presents the system archit,ecture of a typical it is a static algorithm that selects the same degree highly-para.llel database syst,em. The algorithms for of parallelism for all operators regardless of the query selectmingthe degree of parallelism are presented in Sec- type and the workload. tion 3 while algorithms for mapping operators t,o pro- 3.2 MinDp cessors are presented in Section 4. Section 5 discusses how these algorithms can be combined to produce a The degree of parallelism selected by this algorit,hm is comprehensive processor allocation scheme. The simu- equal to the minimum of the degree of parallelism of lation model used for the performance evaluation is de- all the input streams. For example, consider a binary scribed in Section G followed by a, description of the ex- hash-join query where the degrees of parallelism of the periment#al parameters in Section 7. Section 8 presents selects on the inner and outer relations are Inner-dp a performance evaluation of algorithms for determin- and Outer-dp, respectively. The MinDp algorithm will ing the degree of parallelism and Section 9 cont,ains the select the join’s degree of parallelism as min(Inner-dp, evaluation of algorithms for mapping the operators to Outer-dp). processors. Related work is discussed in Section 10 3.3 MaxDp and Section 11 contains our conclusions and sugges- The MaxDp algorithm is sets t,he degree of join paral- tions for future work. lelism to be the maximum of the degree of parallelism 2 System Architecture of the input &earns. Note that in the case of unary op- erators like store, the MaxDp and MinDp a.lgorithms Highly parallel systems are typically constructed using are identical. a sha,red-nothing [25] archit#ecture. The system con- sists of a set of external terminals from which trans- 3.4 RateMatch actions a.re submitted. The transactions a.re sent to The RateMatch algorithm is based on the idea of a. randomly-selected scheduling node. The execution matching processing rates of operators. If the rate of each transaction on the processing nodes is coor- at which tuples are sent to an operator is much higher dinated by a specialized process called the schedvler. than the rate at which the tuples can be processed by The scheduler allocates resources (memory and proces- the operator, incoming messa,ges will accumulate and sors) to the transaction and is responsible for sta.rting the message buffer can overflow, forcing the sender to and terminating all the operators in a t,ransaction. The block. On t,he other hand, if the rate at which t,u- processing nodes are composed of a CPU, memory, and ples are received by an operat,or is much lower than one or more disk drives’. There is no shared mem- the maximum possible processing rat,e, the operator ory/disk between the nodes, hence the term Sha.red- will frequently be idle and will wast,e syst,em resources Nothing. All inter-node communicat,ion is via message (specifically memory). By matching operator process- pa.ssing on the int,erconnection network. ing rates, the RateMatch algorithm prevents senders 3 Determining the Degree of Operator from blocking and, at the same time, conserves system Paralleliqm resources by avoiding idle operators. We next present. t,he formulas used by the RateM- In most shared-nothing database syst8ems, the only atch algorit.hm to calculate the rate at which t.uples are way t,o access data on a node is to schedule a select processed by the select and hash-join operators. Sim- operator on that node. This implies that the degree of ilar formulas can also be developed for other database parallelism of select operators is fixed a-priori by the operators. These formulas adjust the degree of paral- data placement mechanism. However, the degree of lelism based on the current, CPU utilization and disk parallelism for other operators, like joins and stores, response times, and therefore allow the RateMatch al- can be chosen independently of the initial data place- gorit,hm t.o adapt to different workloads and config- ment. We consider four algorithms for determining the urations. We first develop formulas for a single-user degree of parallelism,of such operators. system assuming no buffering of messages, and then 3.1 Maximum incorporate the effect of multiple users and message buffering. The degree of parallelism chosen by this algorithm is equal to t,he number of nodes in t#he system. Maxi- 3.4.1 Processing Rate of Select Operators mum therefore achieves t,he highest parallelism, but it The total time (in seconds) taken by each select oper- ‘For the rest of this paper, the term node is used to collec- ator to process a data page is tively refer to a processor, its l&xl memory and the attached set of disks. 383 where TIIO~,,,,, is the time taken to perform one I/O Maximum Memory Allocation: In the case of and Tcpuselect is the CPU time taken for processing maximum memory allocation, join operators do not one data page. Note that the above equation assumes perform any I/OS. During the build phase, the join a.n overlap in CPU and I/O processing. TI/o~,,,,~ is operators read each incoming tuple and insert them calculated as the sum of the time taken to initiate an into a hash table.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    13 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