Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Approximate QoS Optimization using Hill Climbing Algorithm - Prof. Tarek Abdelzaher, Study notes of Computer Science

An approach to approximate quality of service (qos) optimization using the hill climbing algorithm. The algorithm aims to get quickly to the top of the qos utility function and stay there longest by ascending the path of maximum slope and descending the path of minimum slope. A step-by-step explanation of the algorithm and its implementation, including the calculation of slope and the promotion and demotion rules.

Typology: Study notes

Pre 2010

Uploaded on 03/16/2009

koofers-user-3m4-1
koofers-user-3m4-1 🇺🇸

10 documents

1 / 7

Toggle sidebar

Related documents


Partial preview of the text

Download Approximate QoS Optimization using Hill Climbing Algorithm - Prof. Tarek Abdelzaher and more Study notes Computer Science in PDF only on Docsity! 1 QoS Optimization Multiple QoS Levels QoS Adaptation  Notion of QoS levels  Video server can serve movies at three resolutions:  Level1: 40% CPU, 100% Utility  Level2: 30% CPU, 70% Utility  Level3: 10% CPU, 10% Utility  Same server can broadcast news at three resolutions:  Level1: 30% CPU, 100% Utility  Level2: 20% CPU, 90% Utility  Level3: 10% CPU, 60% Utility  Customers pay  $1/hr of movie streaming  65 cents/hr of news streaming  Degraded QoS levels are discounted proportionally to their utility  How to maximize server revenue? QoS Optimization U=0 U=10 U=20 U=30 U=40 U=50 U=60 U=70 U=80 U=90 U=100 Client1 Client2 Client3 Client4 Client5 QoS Optimization U=0 U=10 U=20 U=30 U=40 U=50 U=60 U=70 U=80 U=90 U=100 Client1 Client2 Client3 Client4 Client5 i U S (i, U) Optimal reward from serving i clients using U% of server utilization δ=10 Optimal Algorithm U=0 U=10 U=20 U=30 U=40 U=50 U=60 U=70 U=80 U=90 U=100 Client1 Client2 Client3 Client4 Client5 i U S (i, U) Optimal reward from serving i clients using U% of server utilization for i=1 to #Clients for U=0 to 100 step δ compute S(i,U) δ=10 Optimal Algorithm U=0 U=10 U=20 U=30 U=40 U=50 U=60 U=70 U=80 U=90 U=100 Client1 Client2 Client3 Client4 Client5 i U S (i, U) Optimal reward from serving i clients using U% of server utilization for i=1 to #Clients for U=0 to 100 step δ compute S(i,U) δ=10 Ri[k]: Reward for serving client i at QoS level k Ui[k]: utilization of QoS level k of client i S(i,U) = maxk {Ri[k] + S(i-1,U-Ui[k])} 2 QoS Optimization Example  Example  Client 1, 2:  Level1: 40% CPU, $1  Level2: 30% CPU, $0.7  Level3: 10% CPU, $0.1  Client 3, 4:  Level1: 30% CPU, $0.65  Level2: 20% CPU, $0.6  Level3: 10% CPU, $0.4 QoS Optimization Example  Example  Client 1, 2:  Level1: 40% CPU, $1  Level2: 30% CPU, $0.7  Level3: 10% CPU, $0.1  Client 3, 4:  Level1: 30% CPU, $0.65  Level2: 20% CPU, $0.6  Level3: 10% CPU, $0.4 U i [k] Ri [k] i k Example U=0 U=10 U=20 U=30 U=40 U=50 U=60 U=70 U=80 U=90 U=100 Client1 Client2 Client3 Client4 i U δ=10 Ri[k]: Reward for serving client i at QoS level k Ui[k]: utilization of QoS level k of client i S(i,U) = maxk {Ri[k] + S(i-1,U-Ui[k])} Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 U i [k] Ri [k] Example U=0 U=10 U=20 U=30 U=40 U=50 U=60 U=70 U=80 U=90 U=100 Client1 Client2 Client3 Client4 i U δ=10 Ri[k]: Reward for serving client i at QoS level k Ui[k]: utilization of QoS level k of client i S(i,U) = maxk {Ri[k] + S(i-1,U-Ui[k])} Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 U i [k] Ri [k]0 0.1(3) 0.1(3) 0.7(2) 1(1) 1(1) 1(1) 1(1) 1(1) 1(1) 1(1) Example U=0 U=10 U=20 U=30 U=40 U=50 U=60 U=70 U=80 U=90 U=100 Client1 Client2 Client3 Client4 i U δ=10 Ri[k]: Reward for serving client i at QoS level k Ui[k]: utilization of QoS level k of client i S(i,U) = maxk {Ri[k] + S(i-1,U-Ui[k])} Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 U i [k] Ri [k]0 0.1(3) 0.1(3) 0.7(2) 1(1) 1(1) 1(1) 1(1) 1(1) 1(1) 1(1) 0 0.1(3) 0.2(3) 0.7(2) 1(1) 1.1(1) 1.4(1) 1.7(1) 2(1) 2(1) 2(1) Example U=0 U=10 U=20 U=30 U=40 U=50 U=60 U=70 U=80 U=90 U=100 Client1 Client2 Client3 Client4 i U δ=10 Ri[k]: Reward for serving client i at QoS level k Ui[k]: utilization of QoS level k of client i S(i,U) = maxk {Ri[k] + S(i-1,U-Ui[k])} Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 U i [k] Ri [k]0 0.1(3) 0.1(3) 0.7(2) 1(1) 1(1) 1(1) 1(1) 1(1) 1(1) 1(1) 0 0.1(3) 0.2(3) 0.7(2) 1(1) 1.1(1) 1.4(1) 1.7(1) 2(1) 2(1) 2(1) 0 0.4(3) 0.6(2) 0.7(2) 1.1(3) 1.4(3) 1.6(2) 1.8(3) 2.1(3) 2.4(3) 2.6(2) 5 Approximate QoS Optimization Hill Climbing Algorithm Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 0,0,0,0 R i [new] - R i [old] U i [new] - U i [old] Slope = Loop if underutilized then take maximum slope promotion if overload then take minimum slope demotion End Loop 0% Promote 3 to L3: Slope=0.4/0.1=4 0,0,L3,0 Promote 4 to L3: Slope=0.4/0.1=4 0,0,L3,L3 10% 20% Promote 1 to L1: Slope=1/0.4=2.5 L1,0,L3,L360% Approximate QoS Optimization Hill Climbing Algorithm Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 0,0,0,0 R i [new] - R i [old] U i [new] - U i [old] Slope = Loop if underutilized then take maximum slope promotion if overload then take minimum slope demotion End Loop 0% Promote 3 to L3: Slope=0.4/0.1=4 0,0,L3,0 Promote 4 to L3: Slope=0.4/0.1=4 0,0,L3,L3 10% 20% L1,0,L3,L3 L1,L1,L3,L3 60% Promote 1 to L1: Slope=1/0.4=2.5 Promote 2 to L1: Slope=1/0.4=2.5 Approximate QoS Optimization Hill Climbing Algorithm Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 0,0,0,0 R i [new] - R i [old] U i [new] - U i [old] Slope = Loop if underutilized then take maximum slope promotion if overload then take minimum slope demotion End Loop 0% Promote 3 to L3: Slope=0.4/0.1=4 0,0,L3,0 Promote 4 to L3: Slope=0.4/0.1=4 0,0,L3,L3 10% 20% L1,0,L3,L3 L1,L1,L3,L3 60% Promote 1 to L1: Slope=1/0.4=2.5 Promote 2 to L1: Slope=1/0.4=2.5 Reward 2.8 Approximate QoS Optimization Restricted Hill Climbing Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 0,0,0,0 R i [new] - R i [old] U i [new] - U i [old] Slope = Loop if underutilized then take maximum slope single level promotion if overload then take minimum slope single level demotion End Loop 0% Approximate QoS Optimization Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 0,0,0,0 R i [new] - R i [old] U i [new] - U i [old] Slope = Loop if underutilized then take maximum slope single level promotion if overload then take minimum slope single level demotion End Loop 0% Promote 3 to L3: Slope=0.4/0.1=4 0,0,L3,0 Promote 4 to L3: Slope=0.4/0.1=4 0,0,L3,L3 10% 20% Promote 1 or 2 to L3: Slope=0.1/0.1=1 Restricted Hill Climbing Promote 3 or 4 to L2: Slope=0.2/0.1=2 Approximate QoS Optimization Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 0,0,0,0 R i [new] - R i [old] U i [new] - U i [old] Slope = Loop if underutilized then take maximum slope single level promotion if overload then take minimum slope single level demotion End Loop 0% Promote 3 to L3: Slope=0.4/0.1=4 0,0,L3,0 Promote 4 to L3: Slope=0.4/0.1=4 0,0,L3,L3 10% 20% Promote 1 or 2 to L3: Slope=0.1/0.1=1 Restricted Hill Climbing Promote 3 or 4 to L2: Slope=0.2/0.1=2 6 Approximate QoS Optimization Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 0,0,0,0 R i [new] - R i [old] U i [new] - U i [old] Slope = Loop if underutilized then take maximum slope single level promotion if overload then take minimum slope single level demotion End Loop 0% Promote 3 to L3: Slope=0.4/0.1=4 0,0,L3,0 Promote 4 to L3: Slope=0.4/0.1=4 0,0,L3,L3 10% 20% Restricted Hill Climbing Promote 3 to L2: Slope=0.2/0.1=2 0,0,L2,L3 30% Approximate QoS Optimization Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 0,0,0,0 R i [new] - R i [old] U i [new] - U i [old] Slope = Loop if underutilized then take maximum slope single level promotion if overload then take minimum slope single level demotion End Loop 0% Promote 3 to L3: Slope=0.4/0.1=4 0,0,L3,0 Promote 4 to L3: Slope=0.4/0.1=4 0,0,L3,L3 10% 20% Promote 3 to L2: Slope=0.2/0.1=2 0,0,L2,L3 0,0,L2,L2 30% 40%Promote 4 to L2: Slope=0.2/0.1=2 Promote 3 or 4 to L1: Slope=0.05/0.1=0.5 Promote 1 or 2 to L3: Slope=0.1/0.1=1 Approximate QoS Optimization Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 0,0,0,0 R i [new] - R i [old] U i [new] - U i [old] Slope = Loop if underutilized then take maximum slope single level promotion if overload then take minimum slope single level demotion End Loop 0% Promote 3 to L3: Slope=0.4/0.1=4 0,0,L3,0 Promote 4 to L3: Slope=0.4/0.1=4 0,0,L3,L3 10% 20% Promote 3 to L2: Slope=0.2/0.1=2 0,0,L2,L3 0,0,L2,L2 30% 40%Promote 4 to L2: Slope=0.2/0.1=2 Promote 3 or 4 to L1: Slope=0.05/0.1=0.5 Promote 1 or 2 to L3: Slope=0.1/0.1=1 Approximate QoS Optimization Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 R i [new] - R i [old] U i [new] - U i [old] Slope = Loop if underutilized then take maximum slope single level promotion if overload then take minimum slope single level demotion End Loop 50% L3,0,L2,L2 Approximate QoS Optimization Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 R i [new] - R i [old] U i [new] - U i [old] Slope = Loop if underutilized then take maximum slope single level promotion if overload then take minimum slope single level demotion End Loop 50% L3,0,L2,L2 L3,L3,L2,L2 Promote 2 to L2: Slope=0.1/0.1=1 60% Approximate QoS Optimization Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 R i [new] - R i [old] U i [new] - U i [old] Slope = Loop if underutilized then take maximum slope single level promotion if overload then take minimum slope single level demotion End Loop 50% L3,0,L2,L2 L3,L3,L2,L2 Promote 2 to L3: Slope=0.1/0.1=1 60% L2,L3,L2,L2 Promote 1 to L2: Slope=0.6/0.2=3 80% 7 Approximate QoS Optimization Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 R i [new] - R i [old] U i [new] - U i [old] Slope = Loop if underutilized then take maximum slope single level promotion if overload then take minimum slope single level demotion End Loop 50% L3,0,L2,L2 L3,L3,L2,L2 Promote 2 to L3: Slope=0.1/0.1=1 60% L2,L3,L2,L2 Promote 1 to L2: Slope=0.6/0.2=3 80% L1,L3,L2,L2 Promote 1 to L1: Slope=0.6/0.2=3 90% Approximate QoS Optimization Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 R i [new] - R i [old] U i [new] - U i [old] Slope = Loop if underutilized then take maximum slope single level promotion if overload then take minimum slope single level demotion End Loop 50% L3,0,L2,L2 L3,L3,L2,L2 Promote 2 to L3: Slope=0.1/0.1=1 60% L2,L3,L2,L2 Promote 1 to L2: Slope=0.6/0.2=3 80% L1,L3,L2,L2 Promote 1 to L1: Slope=0.6/0.2=3 90% L1,L3,L1,L2 Promote 3 to L1: Slope=0.05/0.1=0.5 100% Approximate QoS Optimization Client 1, 2: Level1: 40% CPU, $1 Level2: 30% CPU, $0.7 Level3: 10% CPU, $0.1 Client 3, 4: Level1: 30% CPU, $0.65 Level2: 20% CPU, $0.6 Level3: 10% CPU, $0.4 R i [new] - R i [old] U i [new] - U i [old] Slope = Loop if underutilized then take maximum slope single level promotion if overload then take minimum slope single level demotion End Loop 50% L3,0,L2,L2 L3,L3,L2,L2 Promote 2 to L3: Slope=0.1/0.1=1 60% L2,L3,L2,L2 Promote 1 to L2: Slope=0.6/0.2=3 80% L1,L3,L2,L2 Promote 1 to L1: Slope=0.6/0.2=3 90% L1,L3,L1,L2 Promote 3 to L1: Slope=0.05/0.1=0.5 100% Reward 2.3
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved