A Scalable Solution to the Multi-Resource QoS Problem Chen Lee

By Kochelorov Dmitri
Roadmap
 System modeling
 Formalization of the problem
 Problem complexity
 3 algorithms employing different approaches for
solving the problem
 Results
System Modeling
 n independent applications denoted:
T1 , T2 , , Tn
System Modeling
 n independent applications denoted:
T1 , T2 , , Tn
 Every task Ti has its own QoS requirements (dimensions):
Qi  Qi1  Qidi
 Every Qi j is a finite set of quality choices for the i-th task’s
j-th QoS dimension (discrete QoS settings)
Video-Conferencing App Example
 Cryptographic Security (encryption key-length):
0(off), 56, 64, 128
 Video Related Quality:
 Picture format: SQCIF, QCIF, CIF, 4CIF
 Color depth (bits): 1, 3, 8, 16, …
 Audio Related Quality:
 Sampling rate (kHz): 8, 16, 24, 44, …
 Sample bit (bits): 8, 16, …
Video-Conferencing App Example
 Cryptographic Security (encryption key-length):
0(off), 56, 64, 128
 Video Related Quality:
 Picture format: SQCIF, QCIF, CIF, 4CIF
 Color depth (bits): 1, 3, 8, 16, …
 Audio Related Quality:
 Sampling rate (kHz): 8, 16, 24, 44, …
 Sample bit (bits): 8, 16, …
Qi  {0,56, 64,128} {SQCIF , QCIF , CIF , 4CIF} {K } {K } {K }
System Modeling
 n independent applications denoted: T1 , T2 , , Tn
 m distinct shared resources allocated across the
applications
max
max
max
r

(
r
,

,
r
)
 Maximum quantity of shared resources:
1
m
 Every task Ti has its own QoS requirements (dimensions):
Qi  Qi1  Qidi
 Every Qi j is a finite set of quality choices for the i-th task’s
j-th QoS dimension (discrete QoS settings)
System Modeling
 n independent applications denoted: T1 , T2 , , Tn
 m distinct shared resources allocated across the





applications
Let Ri denote the set of possible allocation choices of
the i-th shared resource
Maximum quantity of shared resources: r max  (r1max ,, rm max )
Set of possible resource allocation choices: R  R1  Rm
Every task Ti has its own QoS requirements (dimensions):
Qi  Qi1  Qidi
Every Qi j is a finite set of quality choices for the i-th task’s
j-th QoS dimension (discrete QoS settings)
Example
3
r max  (r1max , r2max )  (1,3)
1
2
1
R1  {{},{1}}
R2  {{},{1},{2},{3},{1, 2},{1,3},{2,3},{1, 2,3}}
R  R1  R2
System Modeling
 n independent applications denoted: T1 , T2 , , Tn
 m distinct shared resources allocated across the





applications
Let Ri denote the set of possible allocation choices of
the i-th shared resource
Maximum quantity of shared resources: r max  (r1max ,, rm max )
Set of possible resource allocation choices: R  R1  Rm
Every task Ti has its own QoS requirements (dimensions):
Qi  Qi1  Qidi
Every Qi j is a finite set of quality choices for the i-th task’s
j-th QoS dimension (discrete QoS settings)
Task Profile
 A task profile is associated with each task
(application)
 It consists of:
 Application profile provided by application designer
and having two components QoS Profile and Resource
Profile
 User profile providing user-specific requirements for a
session
Application Profile
 QoS Profile:
Quality Space: Qi  Qi1  Qidi
b) Quality Index: f ij : Qij  {1, 2, ,| Qij |}
a)
(it must be order-preserving: q is better than q’ iff
fij (q)  fij (q)
)
Dimension-wise Quality Utility: uij : Qij 
d) Application Utility: ui : Qi 
e) A possible application utility function could be a weighted
sum of dimension-wise utility functions:
c)
di
ui  wij uij (qij )  i, j.0  wij  1
j 1
Quality Index Example
 Cryptographic Security (encryption key-length):
Key length
0(off)
64
128
256
Quality Index
1
2
3
4
Format
SQCIF
QCIF
CIF
4CIF
16CIF
Quality Index
1
2
3
4
5
 Picture Format:
 Sampling rate:
Rate
1
2
3
…
30
Quality Index
1
2
3
…
30
Quality Index Example
 Cryptographic Security (encryption key-length):
Key length
0(off)
64
128
256
Quality Index
1
2
3
4
Format
SQCIF
QCIF
CIF
4CIF
16CIF
Quality Index
1
2
3
4
5
 Picture Format:
 Sampling rate:
Rate
1
2
3
…
30
Quality Index
1
2
3
…
30
Qi  {1, 2,3, 4}  {1, 2,3, 4,5}  {1, K ,30}
Quality Index Example
 Cryptographic Security (encryption key-length):
Key length
0(off)
64
128
256
Quality Index
1
2
3
4
Format
SQCIF
QCIF
CIF
4CIF
16CIF
Quality Index
1
2
3
4
5
 Picture Format:
 Sampling rate:
Rate
1
2
3
…
30
Quality Index
1
2
3
…
30
Qi  {1, 2,3, 4}  {1, 2,3, 4,5}  {1, K ,30}
qi max  4,5,30
Application Profile
 QoS Profile:
Quality Space: Qi  Qi1  Qidi
b) Quality Index: f ij : Qij  {1, 2, ,| Qij |}
a)
(it must be order-preserving: q is better than q’ iff
fij (q)  fij (q)
)
Dimension-wise Quality Utility: uij : Qij 
d) Application Utility: ui : Qi 
e) A possible application utility function could be a weighted
sum of dimension-wise utility functions:
c)
di
ui  wij uij (qij )  i, j.0  wij  1
j 1

A resource profile for the i-th task defines a relation between
R and Qi : ri q
Example
R  (r1, r 2)  (1,3)
T1 : Q1  {1, 2,3}; q1max  3
T2 : Q2  {1, 2}  {1, 2}; q2max  2, 2
Example
T1 : Q1  {1, 2,3}; q1max  3
R  (r1, r 2)  (1,3)
T2 : Q2  {1, 2}  {1, 2}; q2max  2, 2
 Resource Profile for T1
r1
\ r2 0
1
2
3
0
{}
{}
{}
{(1), (2)}
1
{}
{}
{}
{(1), (2), (3)}
 
 
 
 
 
Example
T1 : Q1  {1, 2,3}; q1max  3
R  (r1, r 2)  (1,3)
T2 : Q2  {1, 2}  {1, 2}; q2max  2, 2
 Resource Profile for T2
r1
\ r2 0
1
2
3
0
{}
{}
{}
{}
1
{(1,1)}
{(1,1)}
{(1,1),(1,2)} {(1,1), (1,2), (2,1)}
 

 
  
 
  
  
Application QoS Constraints
 A minimum QoS constraints can be specified by
each application for its relevant QoS dimensions:
min
i
q
 (q
min
i1
,, q
min
idi
)
 When the minimum is not specified the user of the
task might choose not to run it at all.
 The authors of the paper assume that there are
sufficient resources to ensure that the minimum QoS
constraints can be satisfied for all applications.
System Utility
 System utility function:
u : Q1  Qn 
 System Utility can be defined as:
 A (weighted) sum of Application Utilities (for
differential services):
n
u (q1 ,, qn )   wi ui (qi ), where ui is non-decreasing 0  wi  1
i 1
 u=u* (for “fair” sharing), where:
u * (q1 ,, qn )  min i 1,,n ui (qi )
Problem Formulation
 For a given set of tasks T1 , , Tn , our problem is to
assign qualities (qi ) and allocate resources (ri ) to tasks
or applications, such that the system utility u is
maximized:
maximize u(q1 , , q n )
subject to qi  qimin  qi  0, i  1, , n
n
max
r

r
 ij j ,
j  1,, m (ResourceConstraint )
i 1
ri i qi ,
(QoSConstraint )
i  1, , n
Problem Complexity
 The problem is NP-hard.
 The problem has 4 special cases:
 SRSD – Single Resource Single Dimension
 SRMD – Single Resource Multiple Dimension
 MRSD – Multiple Resource Single Dimension
 MRMD – Multiple Resource Multiple Dimension
 SRSD is a sub-case of all other cases
 Since SRSD is NP-hard, all of the cases are NP-hard as
well. (A reduction from 0-1 Knapsack to SRSD can be
shown).
Problem Solution Approaches
 There are three well-studied and widely-used
approaches for solving NP-hard problems:
 Enumerative methods that are guaranteed to produce an
optimal solution
 Approximation schemes that run in polynomial time
 Heuristic techniques that do not have a priori guarantee
in terms of solution quality or running time, but provide
a robust approach to obtaining a high-quality solution to
problems of a realistic size and reasonable time.
Additional Definitions
 Since the task quality spaces are multi-dimensional, there may be no





complete ordering among QoS points.
Moreover, different combinations of resource allocations can be used to
obtain the same QoS point.
Hence, there no function mapping from R to achieved utility.
An R-U graph can be defined through Tasks’s QoS and Resource
Profiles.
To find the greatest utility value achievable by a given resource
allocation, we define: gi : R  ; g i (r )  max{ui ( q ) : ri q}
To retain the quality points associated with the utility value g i ( r ) , we
define:
hi : R  P(Qi ); hi (r )  {q  Qi :ui (q)  gi (r )  ri q}
Example
T1 : Q1  {1, 2,3}; q1max  3
R  (r1, r 2)  (1,3)
T2 : Q2  {1, 2}  {1, 2}; q2max  2, 2
 R-U Graph for T1 (contains elements of type Q1  )
r1
\ r2 0
1
2
3
0
{}
{}
{}
{((1), 1), ((2), 3)}
1
{}
{}
{}
{((1), 1), ((2), 4), ((3), 5)}
Example
T1 : Q1  {1, 2,3}; q1max  3
R  (r1, r 2)  (1,3)
T2 : Q2  {1, 2}  {1, 2}; q2max  2, 2
 R-U Graph for T1 (contains elements of type Q1  )
r1
\ r2 0
1
2
3
0
{}
{}
{}
{((2), 3)}
1
{}
{}
{}
{((3), 5)}
Example
T1 : Q1  {1, 2,3}; q1max  3
R  (r1, r 2)  (1,3)
T2 : Q2  {1, 2}  {1, 2}; q2max  2, 2
 R-U Graph for T2 (contains elements of type Q2  )
r1
\ r2 0
1
2
3
0
{}
{}
{}
{}
1
{((1,1), 4)}
{((1,1), 4)} {((1,1), 4), {((1,1), 4). ((1,2), 5),
((1,2), 5)} ((2,1), 6)}
Example
T1 : Q1  {1, 2,3}; q1max  3
R  (r1, r 2)  (1,3)
T2 : Q2  {1, 2}  {1, 2}; q2max  2, 2
 R-U Graph for T2 (contains elements of type Q2  )
r1
\ r2 0
1
2
3
0
{}
{}
{}
{}
1
{((1,1), 4)}
{((1,1), 4)} {((1,2), 5)}
{((2,1), 6)}
Dynamic Programming Algorithm
 The algorithm is for a two-resource (m=2) case, but can be
extended to higher dimensions.
 Denote by v(i, p1 , p2 )the maximum utility achievable when
only first i tasks are considered with p1 and p2 units (of R1
and R2 respectively) available for allocation.
 Then the recursive optimal solution is:
µ
¶p )  v(i  1, p  µ
¶p )}
v(i, p1 , p2 )  max µ
{
g
(
p
,
p
,
p

i
1
2
1
1
2
2
p {0,, p }
1
1
¶
p2 {0,, p2 }
 The solution for our problem is
v(n, P1 , P2 )
 When traversing the search space, we need to remember
the path for the optimal solution
Example
T1 : Q1  {1, 2,3}; q1max  3
R  (r1, r 2)  (1,3)
T2 : Q2  {1, 2}  {1, 2}; q2max  2, 2
 R-U Graph for T1 (contains elements of type Q1  )
r1
\ r2 0
1
2
3
0
{}
{}
{}
{((2), 3)}
1
{}
{}
{}
{((3), 5)}
Example
T1 : Q1  {1, 2,3}; q1max  3
R  (r1, r 2)  (1,3)
T2 : Q2  {1, 2}  {1, 2}; q2max  2, 2
 R-U Graph for T2 (contains elements of type Q2  )
r1
\ r2 0
1
2
3
0
{}
{}
{}
{}
1
{((1,1), 4)}
{((1,1), 4)} {((1,2), 5)}
{((2,1), 6)}
Example
T1 : Q1  {1, 2,3}; q1max  3
R  (r1, r 2)  (1,3)
T2 : Q2  {1, 2}  {1, 2}; q2max  2, 2
 The merged R-U Graphs of T1 and T2
r1
\ r2 0
1
2
3
0
{}
{}
{}
{((2), 3)}
1
{((1,1), 4)}
{((1,1), 4)} {((1,2), 5)}
{((3), 5), ((2,1), 6)}
Example
 Optimal solution for the example
0
r1
\ r2
1
2
3
0
{}
{}
{}
{((2), 3)}
1
{((1,1), 4)}
{((1,1), 4)} {((1,2), 5)} {((3), 5),
((2,1), 6)}
Example
 Optimal solution for the example
0
r1
\ r2
1
2
3
0
{}
{}
{}
{((2), 3)}
1
{((1,1), 4)}
{((1,1), 4)} {((1,2), 5)} {((3), 5),
((2,1), 6)}
q2 {(1,1)}
v(2,1,3)

4  v(1, 0,3)
Example
 Optimal solution for the example
0
r1
\ r2
1
2
3
0
{}
{}
{}
{((2), 3)}
1
{((1,1), 4)}
{((1,1), 4)} {((1,2), 5)} {((3), 5),
((2,1), 6)}
q2 {(1,1)}
v(2,1,3)

q1 {2}
4  v(1, 0,3)  4  3  v(0, 0, 0)  7
Integer Programming
 Using the Discrete Problem Formulation, Integer
Programming (IP) algorithms can be applied
 The authors used an external library which employs
branch-and-bound algorithm
 In the branch-and-bound method, a tree with LP subproblems as nodes is built, the root node is the LP
relaxation of the original IP problem
 One drawback of BB method is that the solution process
can continue long after the optimal solution has been
found (BB performs exhaustive search of the tree, that can
be as large as 2^n nodes, where n is the number of binary
variables).
Heuristic-Search Algorithm
 The approximation algorithm employs localsearch
technique using the following heuristic function:
 The search space is an augmented R-U graph
 We define a heuristic function on R-U graph nodes:
 let
p  ( p1 , K , pm ), pi  [1, )
be the penalty factor
 and rp  (r1  p1 , K , rm  pm ) be the penalized resource
vector
*
2
2
 then the heuristic function is: r  rp  (rp )  K  (rp )
1
 In the augmented R-U graph each node has its r*
m
Heuristic-Search Algorithm
 The algorithm traverses the search space, the augmented R-U graph,





looking for a maximum, as follows:
The penalty vector is initialized to some values.
do:
 Compute for each node in search space its updated r*
(compound_resource)
 Go with the least penalized node, while maximizing system utility.
 Update the penalty vector (adjust_penalty)
until the solution we found is better than previous one
Return the found solution
Complexity: O(nL log(nL))
Results
 For each task set a given number of task profiles was
generated with following properties:
 The number of QoS options was given.
 The resource usage for QoS options was generated
randomly, but consistently (more resource would not
lead to lower quality).
 The utility for QoS options was generated randomly, but
consistently.
 The three algorithms were run on these task set
 This were repeated for several task sets and averaged
Dynamic Programming
Performance
Figure 1: The Run times of Dynamic Programming algorithm with
r max  180,100
Integer Programming Performance
Figure 2: Running Times for Computing the Optimal Solution using IP
r max  180,100
IP Optimizations
 Optimality tresholds. This approach guarantees to
return a solution within a fixed bound of the optimal
solution.
 The results with optimality treshold of 5% are shown
in Figure 3. The actual quality results are shown in
Figure 4.
 Running time tresholds. A time-out is set. When a
time limit for a problem has expired, the currently
available best solution is returned.
 The solution quality for a 3-second timeout is shown in
Figure 5.
IP Optimization Results
Figure 3: Running times for IP with optimality treshold of 5%
r max  180,100
IP Optimization Results
Figure 4: Solution quality using IP with optimality treshold of 5%
r max  180,100
IP Optimization Results
Figure 5: The solution quality of IP for a 3-second timeout
Compared to dynamic programming. r max  180,100
Heuristic Algorithm Results
Figure 6: Solution quality obtained by heuristic approach r max  180,100
Heuristic Algorithm Results
Figure 7: Running times of heuristic algorithm r max  180,100
Heuristic Algorithm Results
Figure 7: Running times of heuristic algorithm r max  180,100
Note: The runtime is in order of tens milliseconds instead of
tens seconds in Dynamic Programming approach!
Heuristic Algorithm Results
Figure 8: Running times of heuristic algorithm with the number of
resources (m) = 3 and a varying number of QoS dimensions.
Heuristic Algorithm Results
Figure 8: Running times of heuristic algorithm with the number of
QoS dimensions (d) = 3 and a varying number of resources.
Summary
 A general problem of apportioning multiple finite resources to satisfy






the QoS needs of multiple tasks has been studied.
This problem is shown to be NP-hard.
Three strategies for solving MRMD problem were presented and
evaluated.
Two traditional approaches, Dynamic Programming and Integer
Programming yield an optimal solution, but the running times are
high.
An adapted version of IP yields near-optimal results with (potentially)
significant lower running times.
An approximation algorithm based on localsearch technique has
shown the best running times while yielding a solution quality that is
less than 5% away from the optimal.
Additionally, the use “compound resource” allows this technique to be
very scalable and robust as the number of resources increases.