An effective framework involves distributed parallel computing, which operates to disperse processing tasks across multiple processors operating on one or more computing devices such that parallel processing may be executed simultaneously. Important implementations of large scale distributed parallel computing systems are MapReduce by Google®, Dryad by Microsoft®, and the open source Hadoop® MapReduce implementation. Google® is a registered trademark of Google Inc. Microsoft® is a registered trademark of the Microsoft Corporation in the United States, other countries, or both. Hadoop® is a registered trademark of the Apache Software Foundation.
Generally, MapReduce has emerged as a dominant paradigm for processing large datasets in parallel on compute clusters. As an open source implementation, Hadoop has become popular in a short time for its success in a variety of applications, such as social network mining, log processing, video and image analysis, search indexing, recommendation systems, etc. In many scenarios, long batch jobs and short interactive queries are submitted to the same MapReduce cluster, sharing limited common computing resources with different performance goals. It has thus been recognized that, in order to meet these imposed challenges, an efficient scheduler can be helpful if not critical in providing a desired quality of service for the MapReduce cluster.
Generally, it has been recognized that improving data locality for MapReduce jobs can be critical for the performance of large-scale Hadoop clusters, embodying the principle of moving computation close to data for big data platforms. Scheduling tasks in the vicinity of stored data can significantly diminish network traffic, which is crucial for system stability and efficiency. Though issues of data locality have been investigated extensively for map tasks, most conventional schedulers ignore data locality for reduce tasks when fetching the intermediate data, causing performance degradation.
Such a problem of reducing the fetching cost for reduce tasks has been identified recently. However, solutions proposed in that connection are exclusively based on a greedy approach, relying on the intuition to place reduce tasks to the slots that are closest to the majority of the already generated intermediate data. The consequence is that, in presence of job arrivals and departures, assigning the reduce tasks of the current job to the nodes with the lowest fetching cost can prevent a subsequent job with even better match of data locality from being launched on the already taken slots.
In summary, one aspect of the invention provides a method comprising: accepting a job, the job comprising a plurality of phases, each of the phases comprising at least one task; determining, for each of a plurality of slots, a fetching cost associated with receipt of one or more of the tasks; grouping the slots into a plurality of sets; determining a pair of thresholds for each of the sets, the thresholds being associated with the determined fetching costs and comprising upper and lower numerical bounds for guiding receipt of one or more of the tasks.
Another aspect of the invention provides an apparatus comprising: at least one processor; and a computer readable storage medium having computer readable program code embodied therewith and executable by the at least one processor, the computer readable program code comprising: computer readable program code configured to accept a job, the job comprising a plurality of phases, each of the phases comprising at least one task; computer readable program code configured to determine, for each of a plurality of slots, a fetching cost associated with receipt of one or more of the tasks; computer readable program code configured to group the slots into a plurality of sets; and computer readable program code configured to determine a pair of thresholds for each of the sets, the thresholds being associated with the determined fetching costs and comprising upper and lower numerical bounds for guiding receipt of one or more of the tasks.
An additional aspect of the invention provides a computer program product comprising: a computer readable storage medium having computer readable program code embodied therewith, the computer readable program code comprising: computer readable program code configured to accept a job, the job comprising a plurality of phases, each of the phases comprising at least one task; computer readable program code configured to determine, for each of a plurality of slots, a fetching cost associated with receipt of one or more of the tasks; computer readable program code configured to group the slots into a plurality of sets; computer readable program code configured to determine a pair of thresholds for each of the sets, the thresholds being associated with the determined fetching costs and comprising upper and lower numerical bounds for guiding receipt of one or more of the tasks.
For a better understanding of exemplary embodiments of the invention, together with other and further features and advantages thereof, reference is made to the following description, taken in conjunction with the accompanying drawings, and the scope of the claimed embodiments of the invention will be pointed out in the appended claims.
For further background information, including details relating to at least one environment or context in which embodiments of the invention may be employed, incorporated herein by reference, as if set forth in there entirety herein, are co-pending and commonly assigned U.S. patent application Ser. No. 13/278,383, entitled “Resource Aware Scheduling In a Distributed Computing Environment”, filed Oct. 21, 2011, inventors Xiaoqiao Meng et al., as well as U.S. patent application Ser. No. 13/525,778, entitled “Sequential Cooperation Between Map and Reduce Phases to Improve Data Locality”, filed Jun. 22, 2012, inventors Xiaoqiao Meng et al.
It will be readily understood that the components of the embodiments of the invention, as generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations in addition to the described exemplary embodiments. Thus, the following more detailed description of the embodiments of the invention, as represented in the figures, is not intended to limit the scope of the embodiments of the invention, as claimed, but is merely representative of exemplary embodiments of the invention.
Reference throughout this specification to “one embodiment” or “an embodiment” (or the like) means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. Thus, appearances of the phrases “in one embodiment” or “in an embodiment” or the like in various places throughout this specification are not necessarily all referring to the same embodiment.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in at least one embodiment. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the invention. One skilled in the relevant art may well recognize, however, that embodiments of the invention can be practiced without at least one of the specific details thereof, or can be practiced with other methods, components, materials, et cetera. In other instances, well-known structures, materials, or operations are not shown or described in detail to avoid obscuring aspects of the invention.
The description now turns to the figures. The illustrated embodiments of the invention will be best understood by reference to the figures. The following description is intended only by way of example and simply illustrates certain selected exemplary embodiments of the invention as claimed herein.
It should be noted that the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, apparatuses, methods and computer program products according to various embodiments of the invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises at least one executable instruction for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Specific reference will now be made herebelow to
Broadly contemplated herein, in accordance with at least one embodiment of the invention, is a stochastic optimization framework which improves data locality for reduce tasks, with an optimal placement policy exhibiting a threshold-based structure. In order to ease implementation, there is also proposed herein a receding horizon control policy based on the optimal solution under restricted conditions.
By way of general background, for a Hadoop cluster, a master JobTracker is responsible for handling complicated data distribution, tasks assignment and fault-tolerance. It divides a MapReduce job into two types of tasks, map tasks (MapTasks) and reduce tasks (ReduceTasks), and assigns tasks to multiple workers called TaskTrackers for parallel data processing.
MapTasks are short and independent, launched in waves to process data splits. MapTasks from different jobs can share the common computing resources, e.g., the same pool of map “slots”. Differently, ReduceTasks have long execution times that can overlap with the whole process of the map phase, since a reduce task needs to fetch the intermediate data from every map task through the copy/shuffle phase. A ReduceTask is launched almost immediately when its map tasks start. Once it is launched, it stays with the reduce slot until the completion. Therefore, the copy/shuffle phase of the reduce tasks happens at the same time when the map tasks of the same job are in processing. Only after a reduce task fetches all the intermediate data can it start the real reduce function.
Generally, Hadoop can limit the number of jobs that run simultaneously. For example, the following Hadoop cluster supports at most 50 jobs at the same time by setting up the following configuration:
Generally, in addition, Hadoop needs to configure the number of map and reduce slots for each worker (or slave) node. Each slot can grant a single task to run at any time. The JobTracker assigns available MapTasks and ReduceTasks separately from jobs in the queue to available map slots and reduce slots, respectively, one task per slot. For example, the number of reduce tasks that can run simultaneously can be specified by the following parameter:
<name>mapred.tasktracker.reduce.tasks.maximum</name>.
Generally, conventional efforts have not been able to address a problem of improving copy/shuffle performance for sequential jobs through placing reduce tasks. As such, in accordance with at least one embodiment of the invention, to quantify the cost of moving intermediate data, there is introduced the concept of fetching cost. Hadoop assumes a tree topology G=(V, E) that comprises a set V of nodes and a set E of edges. A typical example is illustrated in
If X(u) are evenly distributed on all the nodes X(u)≡X, then there is yielded
where
@H (v) represents the accumulated hop distances for a node v. Therefore, H(v) will henceforth be referred to as an indicator of the fetching cost per bit due to network topology. In general, this cost can also depend on the uneven distribution of the intermediate data. Furthermore, since the involved switches may have different speeds, one can instead use weighted hop distances accordingly.
With continued reference to
It can be noted that the actual network topology of a Hadoop cluster can be much more complicated, especially when Hadoop nodes run on scattered virtual machines. For instance, when deploying a virtualized Hadoop cluster in a Infrastructure-as-a-Service Cloud environment (e.g., Amazon EC2) where tens of thousands of servers are inter-connected with hierarchical network and virtual machines are randomly chosen for users, the number of hops between any two nodes (a.k.a. virtual machines) can be very different. As a result, the cost of data transferring also varies heavily across different Hadoop nodes. The fetching cost per bit H(v) of a node v essentially provides a measure of the quality so that one can compare the performance of different nodes in a quantitative manner. With this being said, a value from a given set can be assigned to a working node by monitoring its performance, e.g., when the topology information is not directly available in a cloud environment.
In accordance with at least one embodiment of the invention,
In accordance with at least one embodiment of the invention let it be assumed that a cluster can run at most K number of jobs simultaneously and the cluster has r number of reduce slots indexed by the list (1, 2, L, r). Upon the submission of job i, its map workload (which includes multiple MapTasks) joins the map queue and its ReduceTasks join the reduce queue at the same time, as shown in
In accordance with at least one embodiment of the invention, for Map tasks, denote by Bi the total workload for the MapTasks of job i, which is measured by the time taken to process the map phase of job i without other jobs present in the system. It is recognized that under Fair Scheduler, the map phases of every job in service get the same share of map slots. Since there are at most K jobs in service simultaneously, the map phase can be modeled by the K limited processor sharing discipline.
In accordance with at least one embodiment of the invention, K limited processor sharing can be defined as follows. For a queue that serves jobs according to their arrival times with at most K jobs simultaneously in service at any time, each job in service is attended with 1/min(n(t), K) fraction of capacity, assuming n(t)≧1 jobs in queue at time t. If n(t)>K then n(t)−K jobs need to wait in the queue.
In accordance with at least one embodiment of the invention, for ReduceTasks, it can be noted that the reduce phase is modeled by a multi-server queue. Job i claims a random Ri,1≦Ri≦
If Xij are equal then Xij=Xi/Ri. It can be noted that the performance bottleneck is in the copy/shuffle phase and the map phase. Therefore, in the present illustrative example of a model, it can be assumed that the time to process the real reduce function can be neglected for ReduceTasks.
By way of another definition, in accordance with at least one embodiment of the invention, assume that {Bi}i>−∞, {Xi}i>−∞ and {Ri}i>−∞ are three sequences of mutually independent i.i.d. random variables that are also independent from all other random variables, with
As such, in accordance with at least one embodiment of the invention, the assumption that Bi is independent of Xi is to ease analysis; it is also recognized that they can be correlated. A beneficial consequence of this correlation is that carefully placing the ReduceTasks can not only decrease the fetching cost but also speed up the job processing.
In accordance with at least one embodiment of the invention, in order to improve system performance, ReduceTasks are placed on nodes such that the total fetching cost is minimized. In this regard, two different scenarios can be studied. First, one can consider a case when the job processing time is much longer than the job arrival interval. This problem can be related to a classic stochastic sequential assignment problem. Secondly, one can investigate a more realistic case when jobs arrive and depart. After a job leaves the system, it will release the occupied reduce slots, which can be further taken by later jobs. Let ξi(j) be the index of the reduce slot where the jth ReduceTask (1≦j≦Ri) of job i is placed.
In accordance with at least one embodiment of the invention, an assignment of K sequential jobs with infinite service time can be illustrated. As such, when the job processing times are very long, e.g., Bi=∞, the system can only process K MapReduce jobs. Therefore, on may consider the problem of minimizing the fetching cost incurred by the first K jobs with the system initially being empty. Specifically, minimize
Under either of the following two assumptions: 1) Xij=Xi/Ri, or 2) {Xij}i≦j≦R
When the ith job arrives, 1≦i≦K, it sees a number of available reduce slots, which is denoted by the list L(i)=(i1, i2, L il(i)) of length l(i) with the corresponding accumulated hop distances Hi(1)≦Hi(2)≦L≦Hi(l(i)). The condition K
In accordance with at least one embodiment of the invention, it is recognized that for each 1≦i≦K with l(i) empty reduce slots, there exist ∞=q0,i≧q1,i≦L≦ql(i+1)+1,i=−∞, that are independent of Hi(j), such that when qy,i>Xi/Ri≧qy+1,i the optimal placement that minimizes (2) is to assign the Ri number of ReduceTasks to the slots indexed by iy, iy+1, L, iy+R
In accordance with at least one embodiment of the invention, there can be defined the total expected fetching cost Ci→K(H(i1), H(i2), L, H(il)) for jobs i, L, K, 1≦i≦K under an optimal ReduceTask placement policy when job i sees the set of available slots with accumulated hop distances Hi(1), Hi(2), L, Hi(l(i)). Correspondingly one can define the conditional expected fetching cost Ci→Kx,v conditional on the event that Xi=x and Ri=v under an optimal policy.
To prove the theorem set forth just above, in accordance with at least one embodiment of the invention, a proof can be based on induction, starting from i=K back to i=1. Proceeding with the case i=K, the optimal placement is to assign the ReduceTasks of job K to the first RK slots in LK=(K1, K2, L, Kl(K)) that have the smallest accumulated hop distances. Therefore, one can set q0,K=□ and q1,K=−∞ since l(K+1)=0.
In accordance with at least one embodiment of the invention, let it be assumed that the results are true for all i>n. Specifically, there exist numbers {qu,i}1≦u≦l(i+1)+1 that are independent of Hi(j), 1≦j≦l(i) for all i>n, 1≦n≦K, such that the optimal placement is to assign the Ri number of ReduceTasks to the slots indexed by iy, iy+1, L, iy+R
of the list L(n),
Using the induction hypothesis, it is known that the optimal placement scheme to optimize C(n+1)→K only depends on the order of the accumulated hop distances of the available reduce slots and is independent of their exact values. Hence, under the optimal placement scheme, defining qj,n as the expected value of the size of the intermediate data fetched at the slot with the jth smallest accumulated hop distance in the optimal scheme of C(n+1)→K. Hence,
Furthermore, since qj,n is independent of the values of the accumulated hop distances Hn(j) and by the induction assumption C(n+1)→K reaches its maximum, it follows that, using Hardy's lemma,
q
1,n
≧q
2,n
≧L≧q
l(n+1),n. (6)
Now, using Equations (4), (5) and (6), and applying Hardy's lemma, there is obtained, if qy,n<xn/rn≦qy+1,n,
which is to assign the ri number of ReduceTasks to the slots indexed by iy, iy+1, L, iy+R
In accordance with at least one embodiment of the invention, it can be recognized that the preceding result reveals the structure of the optimal placement, which is based on thresholds. The following theorem explains the procedure to calculate these thresholds. (Note that because of the assumption K
Thence, in accordance with at least one embodiment of the invention, it can be recognized that by setting q0,n=∞, ql(n+1),n=−∞ for n=1, 2, L, K with q0,K=∞ and q1,K=−∞, there is the following recursion:
where −∞·0 and ∞·0 are defined to be 0.
In accordance with at least one embodiment of the invention, the preceding result can be used to recursively compute the values qj,i. For instance,
q
j,K-1
=Pr[R≦j]∫
0
∞
ydF(y),
where 1≦j≦
To prove the theorem set forth just above, in accordance with at least one embodiment of the invention, one can first prove the result with the condition i>
In accordance with at least one embodiment of the invention, conditioning on the value of Xi=u, Ri=v, there can be explored qi,n-1. Applying Hardy's lemma, it is known that the i'th slot in the list L(n−1) should be assigned to one ReduceTask of job n−1 if and only if qi-v,n>u/v≧qi,n. This is because there is a need to insert v number of larger values after qi-v,n+1, which covers the i'th position in the list (qj,n)1≦j≦l(n). If u/v<qi,n, then the i'th position will get an expected network transfer cost qi,n under the optimal policy, since the v number of values will be inserted after the i'th position in) (qj,n)1≦j≦l(n). If u/v>qi-v,n, this expected value is equal to qi-v,n since there will be v values larger than qi-v,n that need to be inserted in front of qi-v,n. The other scenario i≦
The disclosure now turns to a discussion of the assignment of sequential jobs for a stable system, in accordance with at least one embodiment of the invention. This represents a more realistic scenario when jobs can come and leave. It combines the study of a queuing system with the sequential stochastic assignment for ReduceTasks. In order to simplify the analysis, it can be assumed that {Bi} is a sequence of i.i.d. exponential random variables and the jobs arrive according to a Poisson process with rate λ. For a sequence of jobs i, −∞<i<∞, denote by Wq (i) the number of jobs in the queue and Ws(i), 0≦Ws(i)≦K the number of jobs in service observed by job i, respectively. For job i in service, Θ(i)=(i1, L, iR) is used to denote the indexes of the reduce slots occupied by job i where ijε{1, 2, L, r}. Let ξi(j) be the index of the slot where the jth ReduceTask (1≦j≦Ri) of job i is placed.
In accordance with at least one embodiment of the invention, it can be recognized that since exponential random variables are memoryless, one can use S(i)=((Θ(j), 1≦j≦Ws(i)), Wq(i)) to denote the state of the system observed by job i. An important class of policies is the so-called stationary ones. A policy is said to be stationary if the scheduling taken at any time only depends on the state of the system at that time, i.e., S(i) for job i. Precisely, a stationary policy is a deterministic function mapping the state information into a control action.
In accordance with at least one embodiment of the invention, it can be recognized that if λE[B]<1 and Xij are i.i.d. conditional on Ri, then under any stationary reduce placement policy, the following limit exists
To prove the lemma set forth just above, in accordance with at least one embodiment of the invention, it is recognized that the above result is based on the property of renewal processes. A busy period is when the map queue has at least one job in service; an idle period is when the map queue does not have any running jobs. Since the map queue conducts K limited processor sharing (a work-conserving policy), it is known that the system alternates between idle Ii and busy Bi periods with the condition λE[B]<1. Since the arrival follows a Poisson process, {Ii} and {Bi} form two independent i.i.d. random sequences, as shown in
In accordance with at least one embodiment of the invention, denote by Cm the total network transfer cost and by Nm the number of jobs processed in the mth busy period, respectively. Since the placement policy is stationary, it is known that {Cm} and {Nm} are also two i.i.d. random sequences. Therefore, using the law of large numbers, there is obtained:
In accordance with at least one embodiment of the invention, the disclosure now turns to an investigation of an optimal placement scheme that assigns ReduceTasks on the nodes such that the long term average network transfer cost per job
where H (a) is the accumulated hop distances of the slot with index a.
In accordance with at least one embodiment of the invention, it can be noted that the state Q=((Θ(j), 1≦j≦Ws(i)), Wq(i)) of the system observed by job i upon its arrival is from the state space ((Θ(j), 1≦j≦ms, Θ(j)ε¥P), mq) where mq, ms ε¥{0}. Job i arrives and sees the set L(i) of available reduce slots; if |L(i)|=0 then job i needs to wait in the queue according to FIFO (first in first out) discipline. For a fixed v≧1, all the elements in L(i)vP are sorted using the metric H(•) to form a list LL(i) according to increasing order when |L(i)|>0.
In accordance with at least one embodiment of the invention, it can be recognized that if λE[B]<1 and Ri=v, then, there exist ∞=q0,i≧q1,i≧L≧q|L(i)
In accordance with at least one embodiment of the invention, it can be noted that since all random variables follow exponential distributions, the above theorem implies that the process ((Θ(j), 1≦j≦Ws(i)), Wq(i)) evolves according to a finite state Markov process if the optimal placement scheme (which is a threshold-based stationary policy) is applied.
To prove the theorem set forth just above, in accordance with at least one embodiment of the invention, let D be any element in the state space ((Θ(j), 1≦j≦ms, Θ(j)ε¥P), mq). Since both {Bi} and {Ai} follow exponential distributions that have the memoryless property, we can define the optimal expected fetching cost C(D) starting from the system state D until the first time when the system becomes empty, i.e., at the end of the busy period. Since it is recognized that the expected number of jobs arriving during this period has a finite mean under the condition λ E[B]<1, it is known that C(D) is finite and well defined.
In accordance with at least one embodiment of the invention, it can be noted that when job i arrives, it observes a state Q. Suppose Xi=u, Ri=v, then, the optimal policy is by finding
minAεL(i)
where A∪Q means placing ReduceTasks on slots indexed by set A when observing the state Q. (Reference can be made here to
H(A1)≦H(A2)C(A1∪Q)≧C(A2∪Q). (11)
The preceding result prevails because if H(A1)<H(A2), then exchanging all the indexes in set A1 for the ones in A2 can only increase the total expected fetching cost. The same arguments also apply in the reverse direction. Using Equation (11) and applying induction to the number of linear functions, one can finish the proof of this theorem.
It can be noted, in accordance with at least one embodiment of the invention, that in presence of job arrivals and departures, the optimal placement scheme is still a threshold based policy. However, the thresholds now depend on the accumulated hop distances and the arrival/departure rates, different from the policy calculated hereabove (involving Equations (1) through (7)) that only depends on Xi and Ri. This dependency makes the computation of these optimal thresholds difficult. To ease the implementation, there can be provided provide a policy based on receding horizon control as described herebelow.
Generally, in accordance with at least one embodiment of the invention, there can be noted from the foregoing a theoretical framework to study the optimal placement policy under restricted assumptions, e.g., {Bi} have been assumed to be i.i.d. exponential random variables. The optimal policy is based on thresholds, which however involve complex computations that are not easy to implement. In real MapReduce clusters, the assignment decisions are made under other non-idealized conditions with practical engineering concerns. To this end, there is broadly contemplated herein a heuristic receding horizon control policy based on the insights obtained from previous analysis.
It can be noted, in accordance with at least one embodiment of the invention, that a receding horizon control policy involves optimizing the ReduceTask placement of a newly arrived job by assuming that in the future only one more job that requires the same number of ReduceTasks will be submitted to the system before any other running job finishes, as illustrated in
where H(1)≦H(2)≦H(2)≦L denote the ordered list L of accumulated hop distance values.
In accordance with at least one embodiment of the invention, it can be noted that there are two reasons why there is postulated the condition R1=R2=R. First, in practice, the jobs arriving temporally close often exhibit positive correlations. For example, a number of HBase queries, each being a MapReduce job, are submitted to discover the answers related to the same topic; several large batch jobs, each with a different goal, need to provide statistic reports on log files collected on the same day. Therefore, in these scenarios the number of ReduceTasks of two jobs arriving sequentially may be close to each other. Secondly, a receding horizon control policy should be easy to implement in the real MapReduce system. It is desirable to avoid the complicated computation introduced by the recursive equations, e.g., as shown further above. As such, under the assumption R1=R2, there can be shown a very simple form for the optimal policy that minimizes (12), as characterized by the following theorem.
In accordance with at least one embodiment of the invention, it can be noted that the optimal placement policy has a simple threshold-based structure: if X1≧R1ρ/(1+ρ)E[X/R], then assign the R1 number of ReduceTasks to the slots indexed by 1, 2, L, R1 when job 1 arrives; otherwise to R1+1, R1+2, L, 2R1. When job 2 arrives, it always takes the best R2 slots from the available ones.
In order to prove the above theorem, in accordance with at least one embodiment of the invention, one can observe the following lemma. For a real-valued close set A and real numbers a, b, the linear function ax+by reaches the minimum within the set (x,y):x+y=n, xεA only if |x−y| reaches the maximum. The proof is simply by observing that ax+by=(a−b)x+bn, which reaches its minimum when x is either the smallest or the largest value in A.
As such, in accordance with at least one embodiment of the invention, it can be noted that job 1 brings X1=u, R1=v upon its arrival. Denote by
In accordance with at least one embodiment of the invention, suppose that one assigns job 1 to the nodes indexed by B={i1, i2, L, iv}. When job 2 arrives, it sees job 1 still running in the system with probability p=λ/(λ+μ) and sees an empty system with probability μ/(λ+μ)=1−p. If job 1 has not finished yet, then job 2 has no other choices and can only choose the slots in BC, where BC is the complement of B in {1, 2, L, 2v}. Otherwise, job 2 can allocate its ReduceTasks to the best slots. Using the aforementioned arguments, there is obtained:
Therefore, applying the lemma noted just above, one obtains that
attains its maximum, implying that B can be only equal to {1, 2, L, v} or {R+1, R+2, L, 2+v}.
In accordance with at least one embodiment of the invention, again, applying Hardy's lemma, it is known that the optimal policy is based on the relative relationship between u/v and pE[X/R]: if u/v≧pE[X/R] then B={1, 2, L, v}; otherwise B={R+1, R+2, L, 2v}. This finishes the proof of the theorem.
In accordance with at least one embodiment of the invention, there can now be described an implementation of this placement policy. Since the policy only involves a single threshold ρ/(1+ρ)E[X/R], one needs to estimate ρ and E[X/R]. In recognizing the fact that workload statistics are usually time-varying, e.g., depicting the peak and off-peak hours during a day, one can resort to an adaptive dynamic control policy that constantly updates the estimates of the two required parameters.
Specifically, it can be noted, in accordance with at least one embodiment of the invention, that upon the arrival of a new job i, there can be observed the number Ni of jobs present in the system, the number Ri v of ReduceTasks and the total amount Xi of intermediate data that will be generated by job i. There can be maintained a list W=(w1, w2, L, wτ), wj=(nj, xj, rj), 1≦j≦τ of size τ to record the latest τ observations (Ni, Xi, Ri). Then, there are updated the following estimates of the average queue length
where
In accordance with at least one embodiment of the invention, by way of a well-known queuing result, it is known that EN=ρ/(1−ρ), implying p=ρ/(1+ρ)=
As shown in
Referring now to
In cloud computing node 10′ there is a computer system/server 12′, which is operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well-known computing systems, environments, and/or configurations that may be suitable for use with computer system/server 12′ include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments that include any of the above systems or devices, and the like.
Computer system/server 12′ may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, and so on that perform particular tasks or implement particular abstract data types. Computer system/server 12′ may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
As shown in
Bus 18′ represents at least one of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnects (PCI) bus.
Computer system/server 12′ typically includes a variety of computer system readable media. Such media may be any available media that are accessible by computer system/server 12′, and include both volatile and non-volatile media, removable and non-removable media.
System memory 28′ can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30′ and/or cache memory 32′. Computer system/server 12′ may further include other removable/non-removable, volatile/non-volatile computer system storage media. By way of example only, storage system 34′ can be provided for reading from and writing to a non-removable, non-volatile magnetic media (not shown and typically called a “hard drive”). Although not shown, a magnetic disk drive for reading from and writing to a removable, non-volatile magnetic disk (e.g., a “floppy disk”), and an optical disk drive for reading from or writing to a removable, non-volatile optical disk such as a CD-ROM, DVD-ROM or other optical media can be provided. In such instances, each can be connected to bus 18′ by at least one data media interface. As will be further depicted and described below, memory 28′ may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
Program/utility 40′, having a set (at least one) of program modules 42′, may be stored in memory 28′ (by way of example, and not limitation), as well as an operating system, at least one application program, other program modules, and program data. Each of the operating systems, at least one application program, other program modules, and program data or some combination thereof, may include an implementation of a networking environment. Program modules 42′ generally carry out the functions and/or methodologies of embodiments of the invention as described herein.
Computer system/server 12′ may also communicate with at least one external device 14′ such as a keyboard, a pointing device, a display 24′, etc.; at least one device that enables a user to interact with computer system/server 12; and/or any devices (e.g., network card, modem, etc.) that enable computer system/server 12′ to communicate with at least one other computing device. Such communication can occur via I/O interfaces 22′. Still yet, computer system/server 12′ can communicate with at least one network such as a local area network (LAN), a general wide area network (WAN), and/or a public network (e.g., the Internet) via network adapter 20′. As depicted, network adapter 20′ communicates with the other components of computer system/server 12′ via bus 18′. It should be understood that although not shown, other hardware and/or software components could be used in conjunction with computer system/server 12′. Examples include, but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.
It should be noted that aspects of the invention may be embodied as a system, method or computer program product. Accordingly, aspects of the invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module” or “system.” Furthermore, aspects of the invention may take the form of a computer program product embodied in at least one computer readable medium having computer readable program code embodied thereon.
Any combination of one or more computer readable media may be utilized. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having at least one wire, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store, a program for use by, or in connection with, an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire line, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the invention may be written in any combination of at least one programming language, including an object oriented programming language such as Java®, Smalltalk, C++ or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on the user's computer (device), partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
Aspects of the invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture. Such an article of manufacture can include instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
This disclosure has been presented for purposes of illustration and description but is not intended to be exhaustive or limiting. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments were chosen and described in order to explain principles and practical application, and to enable others of ordinary skill in the art to understand the disclosure.
Although illustrative embodiments of the invention have been described herein with reference to the accompanying drawings, it is to be understood that the embodiments of the invention are not limited to those precise embodiments, and that various other changes and modifications may be affected therein by one skilled in the art without departing from the scope or spirit of the disclosure.