building an adaptive multimedia system using the utility model lei chen, shahadat khan, kin f.li...
TRANSCRIPT
Building an Adaptive Multimedia System using the Utility Model
Lei Chen, Shahadat Khan, Kin F.Li & Eric G.ManningPANDA Group, University of VictoriaVictoria, British Columbia, Canada
2
Overview
The problem
The Utility Model (UM)
Layered Coding and Transmission (LCT)
How to apply the Utility Model to LCT
The Quality Utility Extension
Unix Kludges
Implementation & Experimental Results
3
The Problem:
How to share resources in a multimedia system?
Contention for resources by competing applications
but
Multimedia real-time constraints demand resource guarantees to guarantee QoS
4
For example ...
Receiver
Bandwidth y
Bandwidth x
Total Bandwidth z
(x+y > z)
File Transfer
Video-on-
demandPlayback
6
We will
Optimize server revenue (utility) while
fully respecting all resource constraints demanded by hard QoS guarantees byon-line session admission & upgrades
devise a bidding HMI protocol
7
The Utility Model (UM)
session utility ui(Qi)
session utility function
system utility objective
resource mapping
system resource constraints
maximize U = ui(Qi) r (Qi) R
session resourcesr (Qi)
gold
session i
bronze silver
Quality Qi
8
The Utility Model (UM)
defines relationships among quality profile, quality-resource mapping, session and system utility, application and system resource constraints,
formulates the Adaptive Multimedia Problem (AMP):
Given:quality-resource mappings and quality-utility
mappings, maximize some system utility function, subject to resource constraints.
9
Knapsack problems:
u=10p=5
u=8p=4
u=15p=8
Pick items to maximize weight (utility) U=u,
subject to volume constraint (resource constraint): p39
10
UM as an MMKP problem
Let: stones be sessions at QoS levels piles of stones be sessions volume be multidimensional (multiple resources):
Choose: at most one stone per pile to maximize revenue (weight) subject to all resource constraints
(multidimensional volume)
11
Solving the AMP:
u=10p=5m=4
u=8p=4m=5
u=15p=8m=7
u=20p=10m=8
u=20p=8
m=10u=25p=15m=15
u=50p=20m=22
u=30p=15m=21
Pick at most one item from each stack in order to maximize U=u,
subject to resource constraints: p39m35
i.e. map AMP to a Multiple-choice Multi-dimensional 0-1 Knapsack Problem (MMKP):
12
UM as an MMKP
Solve the MMKP
• algorithm BBLP gives optimal solutions
• heuristic HEU gives approximate but fast solutions
– 300 sec for moderate problems;– suitable for realtime session admission control
13
Layered coding:
codeword
Base quality improvements
B E1
B: crude image -bronzeB +E1: better - silverB+E1+E2: still better - gold
E1B E2
14
Layered Coding and Transmission
Layered coding methods:
• spatial layering (e.g. JPEG, MPEG, Pyramid coding, Sub-band coding)
• temporal layering (e.g. Motion-JPEG, H.261, DVI, MPEG-2, etc)
15
Layered transmission by multicast:
Send each part of the codeword as a separate multicast group
the more groups received, the better the quality
Layered transmission methods:• IP Multicast and MBone• RLM ( Steve McCanne, UCB)• DSG (Georgia Tech. Inst.)• LVMR (by Xue Li, Georgia Tech.)
16
Using the UM:
Receiver maps quality levels into
resource requirements
UM selects the quality level based on available resources
17
Using the UM:
Receiver
Video-on-DemandPlayback
The Utility Model
Quality selection
bronze
E1
E2
silver
gold
Base
CPU BWin BWout
T
18
Questions
How to design the interface between LCT and the UM?
What resources need to be monitored?
What resources can be monitored?(using an off-the-shelf OS)
What resources can be reserved?
How? (Major Operating Systems problems )
19
More Questions ...
How to derive quality-resource mappings?
How to use the UM in an obsolete* best-effort environment, i.e. the present Internet off-the-shelf operating systems
(Unix, Windows, MacOS)
_____________________* from the viewpoint of multimedia with QoS
20
Demonstrations
best-effort system: the UM adapts by scaling back QoS levels of
the sessions in its domain
reservation based system:all resources & sessions in UM’s domain, so UM optimally sets QoS levels of all
sessions.
21
The Unix QUE
Unix Quality Utility Extension (QUE) provides an extension to a traditional
OS for QoS management
based on the UM
estimates quantities which cannot be easily measured in Unix
22
Unix QUE
implements the concepts of the UM: session profiles, quality-resource mapping, session and system utility, and resource constraints;
supports : admission control and quality adaptation (HMI bidding protocol )
24
QUE Components & Interfaces
Interfaces• The Quality Management Interface(QMI) -
between the UME and applications
• The Graphical User Interface(GUI) - between the UME and users
• The Resource Reservation and Monitoring APIs - between the UME and OS;
25
QUE components:
GUI
Reservation Agent
Resource Monitor
Admission Request or
QoS Mapping Change
Admission Reply or
Quality Change
Reserve get usage
Operating System
Applications
Services Management
QMI
Service API Resource Reservation API Resource Monitoring API
Utility Model Engine
Consume Resources
User
Adaptation Status
QoS Mapping Change
Start Application
Obtain Services
26
QUE: Admission Control (HMI protocol)
UME must guarantee each session’s minimal quality;(by reserving the minimal resources required)
a session is accepted iff• enough free resources to provide minimal QoS, and
• increase in system utility ($$)
sessions must obey UME’s adaptation decisions
27
HMI protocol:Quality Adaptation
occurs when
• new session admitted,• a session’s QoS mappings changes,• a session is terminated,• available resources change.
Operating System
New / Drop / Change session profile
1
13
Utility Model Engine
ApplicationApplication
Application
2
2
Adjust reservation in system resources
Available resources change
Resulting changes in
resource usage
28
QoS Mapping
quality-utility mappingrefine the quality-resource mapping:
• quality-methods mapping• method-resources mapping
gold
session i
operating quality Qi
session utility ui(Qi)
session utility function
system utility objective
resource mapping
system resource constraints
bronze silver
maximize U = ui(Qi) constraint r (Qi) R
session resourcer (Qi)
QoS scaling methodmi (Qi)
resource requirementsr (mi)method-resources mapping
quality-methods mapping
29
The QUE (cont.)
Example: (gold, silver, bronze)
Video: 5 fps M-JPEGAudio: monoImage: gray scaleConsistency: noneLatency: high
Video: 15 fps VHSAudio: stereoImage: low-res colorConsistency: looseLatency: medium
Video: 30 fps HDTVAudio: surroundImage: hi-res colorConsistency: tightLatency: low
CPU: 30%in BW: 5 Mbpsout BW: 512Kbps
CPU: 20%in BW: 384 Kbpsout BW: 64 Kbps
CPU: 10%in BW: 56 Kbpsout BW: 14.4 Kbps
set_fps(30, HDTV);set_sound(surround);set_img_size(hi_res_c);consis_grp(join_all);...
Method 1
set_fps(15, VHS);set_sound(stereo);set_img_size(lo_res_c);consis_grp(join_base);...
Method 2
set_fps(5, mjpeg);set_sound(mono);set_img_size(grey);consis_grp(none);...
Method 3
User-level QoS
Application-level QoS
System-level QoS
Other Methods
30
The QUE (cont.)
QoS Agents: per-session proxy
provides QoS mappings
maintains session profile
handles communication between session and UME.
Admission Reply
Quality Change
Application
$100
Gold
void set_fps (30);
in,out,cpu(30, 15, 25)
$100
Gold
void set_fps (30);
in,out,cpu(30, 15, 25)
$100
Gold
void set_fps (30);
in,out,cpu(30, 15, 25)
QoS Agent
Admission RequestSession Profile
Operating System
Consume Resources
Map Quality-UtilityMap Quality-Methods
Utility Model Engine
Service API
QMI
31
OS requirements:
OS must be able to
allocate resources to sessions as decided by QUE
enforce allocations on misbehaving sessions
measure per-session consumption of each resource & report results to QUE
32
Meanwhile (in the Unix world) . . .
No enforceable resource allocation available in Unix No per-session resource consumption data System-level monitoring of consumption via /proc Resource consumption estimated as follows:
CPU T = user
_____________________ (% total cpu cycles/sec)user + nice + idle + OS
Tx T = totalTx T - totalTx T-1 (packets / sec )
RxT = totalRx T - totalRx T-1 (packets / sec )
RHS quantities obtainable from /proc in Unix.
33
Estimating resource consumption in unix ...
define:• raw - total amount of a resource provided by the
hardware• manageable - available to the UME• unmanageable - used by applications out of the
UME’s domain– raw = manageable + unmanageable
• allocated - required to support operating QoS of admitted sessions
– free = manageable - allocated : the unused resource
• reserved - required to support minimal QoS of admitted sessions
34
Getting around a unix defect - no reservations:
In an unreserved system (unix)allocations cannot be enforcedapplications contend for resources at run-
time;so manageable resources must be
adjusted to avoid contention but contention cannot be detected at OS
level: (one cannot distinguish full utilization from contention.)
35
Contention Avoidance (the problem):
Only raw T and monitored T are measurable;how to infer manageable T ?
manageable
unmanageable
raw
allocated
free
manageable
monitored
free
raw
Resource usage reading at time tResource partitions in the UME at time t-1
Question: How should the UME partition the resource at time t ?
Quality adaptation result
36
Estimating Manageable for Contention Avoidance:
assume applications do not over-consume
initial condition:manageableT=0 = 95% * rawT=0
Now
monitored T < allocated T => no out-of-domain work => manageable T = 95% * raw T
monitored T > allocated T => out-of-domain work =>
manageable T = raw T - unmanageable T =
raw T - ( monitored T - allocated T-1 )
38
Implementation and Results
Prototype implementation
implemented the QUE over Linux implemented VoD, which uses LCT implemented QFTP, a rate controllable
file transfer program
39
Experiment setup
QUE used in client
beet.csc.uvic.ca142.104.101.30
Redhat Linux 2.1
Server B
pepper.csc.uvic.ca142.104.101.29
Redhat Linux 2.1
Client C (QUE)
10 Mbps Ethernet
1.6 Mbps 1.6 Mbps
spring.csc.uvic.ca142.104.101.11
Solaris 2.4
Server A
1.6 Mbps 1.6 Mbps1.6 Mbps 1.6 Mbps
40
Implementation and Results (cont.)
Best-effort mixed system (like today’s Internet) VoD (in UM’s domain) starts first. FTP (outside UM’s domain) seizes most of the inbound bandwidth. UME required to scale back the quality of VoD VoD customer cancels service agreement, sues provider
Client C
FTP
Utility Model Engine
VoD
Scale back !
contention
Quality Utility Extension
Inbound bandwidth
From Server A
From Server B
41
QUE obeys system and application resource constraints.
QUE: dynamically adjusts manageable resource; adapts application’s QoS to avoid contention; reserves required resources for applications’ minimal QoS; does not scale back beyond the reserved level of the resource.
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
0 10 20 30 40 50 60 70 80 90 100
Re
sou
rce
(In
bo
un
d b
an
dw
idth
)
manageable
allocated
reserved
monitored
A CB
42
Reservation based system (future Internet, modern OS):
VoD preferred over QFTP (more utility offered) preference then changed to favour QFTP (its $$
increased) UME required to optimally adapt both sessions’ QoS
Client C
QFTP
VoD
gold
provision
Quality Utility Extension
Inbound bandwidthsilver
From Server A
From Server B
Quality Resource Utilbronze 40 pps $5silver 60 pps $10gold 120 pps $15
Quality Resource Utilbronze 25 pps $50silver 35 pps $75gold 60 pps $100
Utility Model Engine
silver
43
Implementation and Results (cont.)
QUE adapts both applications according to UM decisions:
predictive system behavior
increased system utility
optimal resource allocation among applications
happy customers
0%10%20%30%40%50%60%70%80%90%
100%
0 20 40 60 80 100 120 140 160 180 200 220 240R
eso
urc
e (
Inb
ou
nd
ba
nd
wid
th)
QFTP: allocated
VoD: allocated
A B C D
manageable
$0
$50
$100
$150
$200
$250
0 20 40 60 80 100 120 140 160 180 200 220 240
Sys
tem
Util
ity
A B C D
44
Performance
Pentium 166MMX with 40MB memory 300ms (mean) for admission control less than 2ms for quality adaptation
min max avg min max avg3 sessions 0 18 1.09 288 292 290.335 sessions 0 9 1.21 187 292 218.208 sessions 0 45 1.54 292 319 301.7512 sessions 0 11 1.07 293 327 307.50
quality adaptation admission control