400 likes | 569 Views
Jim (Zhanwen) Li Carleton University. John Chinneck Carleton University. Marin Litoiu York University. Murray Woodside Carleton University. Deployment of Services in a Cloud Subject to Memory and License Constraints. IEEE International Conference on Cloud Computing, 2009.
E N D
Jim (Zhanwen) Li Carleton University John Chinneck Carleton University Marin Litoiu York University Murray Woodside Carleton University Deployment of Services in a Cloud Subject to Memory and License Constraints IEEE International Conference on Cloud Computing, 2009 Presented by: Yun Liaw
Outline • Introduction & Related Works • Service Systems and Deployment • Heuristic Packing (HP) • Network Flow Model (NFM) • Computational Experiment • Conclusions and Comments
Introduction (1/3) • Cloud support flexible deployment as an application’s need change, hide management details from the user and the service provider, and require payment only for resources used • An economic driver for clouds is the efficiencies achieved by sharing resources among deploying applications • Must be able to scale to thousands of services running on thousands of hosts • Be cheap enough to re-run frequently as load changes
Introduction (2/3) • Deployment solution should be based on the execution demands of applications • The execution demand may be obtained from performance tests or from operating data(thus the change of demands can be tracked)
Introduction (3/3) • In the previous works, deployment optimization algorithms have been proposed, but none of them have respected the memory constraints on the hosts and the license constraints on the applications • If the license constraint violates, additional cost would be reflected in the optimization cost function (soft constraint) • This paper is motivated by multi-dimensional bin-packing with 3 dimensions: • Memory • Execution demands (processor) • License • Also add NFM to minimize the cost
Related Works • Deployment optimization: • Minimize the communications between the distributed hosts • Minimize the deployment changes on incremental deployment • LQN + NFM • Bin-Packing heuristics
Attributes (1/2) • fUser,c: request rate of UserClassc • fUser,c,SLA : minimum required value of fUser,c • SUser,c : the set of services used by UserClasslassc • STask,t: the set of services provided by task t • Ycs : mean requests by UserClassc to Service s, during one response to a user request, including direct and indirect requests • ds : mean host demand of Service s, per invocation, in CPU-second • Mt : memory requirement of task t (assume the same for all hosts) • Lt : max license available for task t
Attributes (2/2) • CLt: pay-per-use cost of extra licenses for task t, beyond Lt • Ch : execution cost of host h, a cost factor for a unit of execution on this host. In a homogeneous cloud these are all equal • Mh: memory capacity of host h • Ωh : the capacity limit of host h, given as a processing rate relative to a “standard” host. • Uh: utilization of host h = Ωh/saturationCapacity of h
Example - Ycs • Ycs Example: YUser1,DB2Serv= 1 * 0.3 * (0.7+0.3 * 0.4) = 0.336
Task demands : dt • At the required throughputs, the CPU demand dt, in CPU-seconds per second for task t (1)
Example - dt • dt Example: • Assume ds = 1 except for task 4, which ds = 0.01 • If fUser1,c,SLA =20/sec fUser2,c,SLA=30/sec • dt1 = 50 • dt2 = 15 • dt3 = 4.5 • dt6 = 16.8
Constraints (1/2) • Define αht be the part of dt which is executed by host h • , for all h(2) • , for all t(3) • The cost of execution per unit of time • (4) • Define Aht be the allocation variable s.t. • Aht =1 if αht> 0, Aht = 0 otherwise (5)
Constraints (2/2) • Memory and License constraints • Memory : , for each h (6) • License : , for each t(7) • Cost of exceeded licenses • For a task t with , order the flows αht from largest to smallest • For the first Lt of these flows, set C*ht = Ch • For the remainder, set C*ht = (Ch+CLt) • (8)
Node Utilization and Quality of Service • QoS is often stated in terms of response delay or throughput. However, these metrics are replaced here by constraints on host utilization • In equality , for all hstates that every host has a utilization less than the maximum utilization • In [*] it shows that if the host utilization is low enough, the contention will be moderate. • Response time will be limited to a low multiple of execution demands to satisfy the request C. Tang, et al., “A Scalable Application Placement Controller for Enterprise Data Centers,” in Proc. WWW, 2006
Heuristic Packing – Intro • Bin-packing problem: • Given a set of items, each having a single dimension of its own “size” • The task is to pack all of the items into the smallest number of identical bins • In the proposed heuristic, the best-fit packing heuristic is used • Sort items from the largest to the smallest • Items are taken from the list in order and packed into the bin that leaves the smallest amount of unused space
Heuristic Packing Formulation • The HP heuristic determines the allocation variables Ahtwith the goal to minimize the number of hosts usedsubject to the constraints mentioned previously • The packing process goes through a sequence of states in which tasks are partially allocated • : remaining memory space of host h • : remaining execution demand space of host h The available part of for allocation to a single task • : remaining execution demand of task t • Reservation factor: to prevent a host from being reserved for a single task
Heuristic Packing – Algorithm (1/3) • Initialize: • ,, • Algorithm: • Sort tasks by Lt (# of license) in increasing order (break ties by sorting by CPU demands , largest first)
Heuristic Packing – Algorithm (2/3) • For each task t in order • Sort the hosts that have greater than Mt, by their CPU execution demand space, largest first • If for the host h(1), then the remaining demand of task t will fit into one host • Find the best fit for , i.e., the host h with the smallest • Allocate all of to host h, that is to say:set , decrement by , set • Proceed to allocate the next task
Heuristic Packing – Algorithm (3/3) • For each task t in order(cont’d) • Else if , for the first host, the remaining demand will not fit into one host • Allocate as much of as possible to h(1), that is to say:set , decrement by , and decrement by • Repeat step 2 for the same task t
Effectiveness of HP • A scalable example conforming to the service was defined as follows: • A list of tasks, each with dt in [10,70] ms, Mt in [5,25], and Lt in [1,5] chosen randomly • A list of host processors, each with Ωh in [80,120], Mh in [50,100] Ch in [1,3] chosen randomly Note: The cost is not minimized in HP
Network Flow Model (1/2) • A network flow model (NFM) is a graph with arcs which carry flows and nodes which operate on the flows • The flow into a host node is its total execution supply fHost,h. These flow are divided between hosted tasks, then the service entries, and finally the user classes • The input flow and output flow are balanced by NFM (total input = total output)
Network Flow Model (2/2) • Arcs: represents the flow of execution demand/supply • If a task t is permitted to be deployed on h, there is an arc from h to t with the flow αht • Each arc is labeled with a triple of parameters [l,u,c] • l : the lower flow bound (default 0) • u : the upper flow bound (default infinite) • c : the cost per unit of flow (default 0) • The input flow fHost,hare labeled by [0,Ωh,Ch]
Solve-NFM • To solve this NFM problem is a standard linear programming (LP) problem to minimize the COST* defined by (8), subject to the constraint : • , for all h(2) • , for all t(3) • However, NFM does not scale well. There are n*m arc flows to be determined by an LP with nm variables
The Combined Algorithms • Because HP alone does not minimize cost, thus it was combined with an NFM solution • HP-NFM: • Firstly run HP to prune host-to-task arcs • Then use NFM to determine the αht to minimize the COST* • In order to provide some freedom at NFM step, all demands are multiplied by a looseness factor > 1 at HP step • HP-NFM-HP • If the license constraint is failed by running HP-NFM, it is a final packing step succeeded in re-imposing the constraint • Two variant are provided, described later
HP-NFM • A small number of processors is first found by HP • satisfying the memory constraint and • if possible the license constraint • Then the minimum-cost rates of processing the tasks are found by NFM • Looseness factor : set to be 1.1
HP-NFM – Algorithm • Apply HP, after augmenting the all of the dt by the looseness factor 1.1 • Construct a pruned NFM with: • Nodes for the tasks, and for the hosts that have been used in Step 1 • The task demands dt without looseness factor • Arcs from each host to tasks allocated by HP, with cost C*ht on arc (h,t) • Apply Solve-NFM to minimize the COST*
HP-NFM-HPx • The HP-NFM may spread the allocations out over more processors than necessary, due to the looseness factor • Thus a final HP step without looseness factor is introduced to reduce the number of processors • To counter under-utilized hosts, choose an idleness threshold for hosts. Hosts withare de-allocated, and repacked by HPagain • To counter license violations, tasks which exceed their limit had the excess replicas de-allocated • HP-NFM-HP1 : considers both 2 criteria • HP-NFM-HP2 : considers only license criterion
HP-NFM-HPx – Algorithm (1/2) 1 – 3 executes algorithm HP-NFM • (In the HP1 variant only) Unpack under-utilized hosts: for each host h with • For each task t, increment by αht • Set =
HP-NFM-HPx – Algorithm (2/2) • In both variants, unpack for license violations: For each task t which has • Sort the demand allocations αhtin increasing order • For the first Vt of these demands, increment both and by αht • Apply algorithm HP without looseness factor to repack the remaining execution of the tasks with > 0
Control Parameter Settings • Maximum capacity: 80% of saturation capacity • License violation penalty : 10 * the number of license violations • Looseness factor : 1.1 • Reservation factor : 20% • Idleness threshold : 20% of the maximum capacity
Looseness and Reservation Factor • Reducing reservation factor reduces cost • Increasing looseness factor only reduces the cost a little-> freedom it provide to NFM is not valuable
Conclusions • This paper presents an algorithm for heuristic optimization of task deployments in the Clouds • Combining packing heuristic and linear programming • Considers CPU, memory and license constraints • The numerical experiments shows that HP-NFM-HPx is proffered • Less hosts are used • Lower economic cost and solution time
Comments • The experiment is only at the computational level • QoS? • Does the resource demand grows linearly with the request rate? (need verify)