Post on 29-Jan-2016
Lecture 7. P2P streaming: design aspects and performance issues
Dmitri Moltchanov, TUT, Fall 2015Dmitri Moltchanov, TUT, Fall 2015
OutlineQuality: compression basics
How to assess video quality?
Recent observations of live streaming systems
Improving streaming performance in P2P systemsOverlay architecturesLayered codingMultiple description codingSchedulingIncentive mechanismsTraffic localizationActive quality control?
The main differenceScheduling of chunks
Why? Different quality metrics!
Recall BitTorrentRarest chunk firstTit-for-tatImprove network wide dissemination first
P2P streamingScheduling windowNext chunk firstImprove my own performance first
Compression basics
Performance degradationNetwork transmission
LossesDelays
Well, what’s about compression?Highly desirable/undesirable for network environment
Desirable: reduces required rate up to 20 times
UndesirableDegrades the quality (lossy compression)Magnifies the effect of losses
Video compression standardsVideo: two or more media Mx-ed streams
Video streamAudio stream (voice as a special case) Additional streams, e.g. subtitles, different languages, etc.
StandardsITU-T Video Coding Experts Group (VCEQ): H.26xISO/IEC Moving Pictures Experts Group (MPEG): MPEG-1/2/4/7
What do these standards provideAnalog/digital digital/analog conversionLossy compression of mediaStream descriptionPacketization
How compression is achievedCompression removes the following redundancies
SpatialTemporalPsycho-visual
We exploit them byPredicting pixel values in spacePredicting them in timeLoosing some unnecessary info
Compression: up to 30 times
Types of framesThree types of frames
I-frame (intracoded)P-frame (predicted)B-frames (bi-directionally predicted)
Frames can be organized in a group of pictures (GoP)
A repeated sequence of framesWhy? Access unit for playersExample: (3,12), 3 distance between I and P, 12 length of GoP
Temporal predictionRemoving temporal redundancy
Works with digitized macroblocks
A problem with predictionRecall transmission media for a moment
Loss of a packetError propagation in timeError propagation in space
Assessing video quality
Metrics of interestMetrics we care here
Service integrityAudiovisual quality
Service integrityContinuity of playback
Affected by system topology, network performancePrefetching delay (response time)
Affected mainly by the topology…
What quality we are talking about? A joint oneVideo qualityAudio qualityOverall quality (audio+video)
Joint assessment of video and audioWe are talking about multimedia here
One of media may have more profound effectAudio/video degradation do correlateThey may affect joint quality in some complex way…
How to access the quality?Develop a new test for multimedia?Develop audio and video separately and then combine them?
Single test for joint qualityCould be complicated
Separate onesEasier to developReuse of existing conceptsHow to join together?
Subjective tests for video/audioMOS: Mean opinion score
Survey humans watching your service in similar conditionsAsk them to grade it using a certain scale, e.g. 1-5Compute the mean…
What are the problems with MOSRequires an audience of peopleRequires very specific conditionsThere are a number of standards (e.g. ITU-R BT-500.11 for video)What’s about network environment?
Video: objective testsWhat do they do?
Try to automate the process of quality assessment
How: try to provide good correlation with subjective tests
Simple tests: based on comparing pixel values
Complex tests: based on properties of human visual system
Types of objective testsBased on availability of video at the evaluation point
RF: full-reference
RR: reduced-reference
NR: no-reference
Suitability for networkingNR are fully appropriate
RR are appropriate
FR are not suitable at all
Video: objective testsSimple pixel-based metrics
Mean squared error (MSE)
X and Y are arrays of pixels, N is the number of pixelsPeak signal-to-noise (PSNR)
L is max possible pixel value
Some observationsSometimes provide poor performanceBut: only few advanced FR VQA techniques are betterInherently of FR type… Can be modified to work in network environment
Audio: subjective testsFirst of all, what media are we talking about?
Speech? 0.3-3.4KhzAudio? 0.02-20KHzThey are way different!
Subjective tests are MoS based
Objective testsSimilar classification NR/RR/FR
ITU-T P.862, PESQ for speech, FR typeITU-R BS.1387, PEAQ for audio, FR type
No RR/NR tests proposed yet for generic audioThere is for speech… let us consider as an example
Speech: E-modelITU-T G.107 E-model needs
Type of the codecNetwork-intristic performance metrics
IP packet loss ratio (IPLR)IP packet transfer delay (IPTD)
Measure of quality is R-factor
R0 – starting value
Is – degradation as a result of compression/coding
Id – degradation caused by end-to-end delay
Ie – degradation caused by losses
A – advantage factor
Speech: E-model and MoS
Does not work as expected… Why?Packet losses tends to clipUsers differently perceives
Switching from bad to good quality seems longer that it isSwitching from good to bad is almost instantly perceived
Non-linear model
ra, rv, rav – MOS values of audio/video/combined stream
some coefficients we need to findrarv – responsible for cross-dependence factor
Usage of this modelsYou need to fit it to empirical dataLinear without cross-dependence factor rarv
Concluding notesMost models developed for low-bit-rate low-motion videoEverything greatly depends on the type of the codec
Loss may lead to the loss of a whole frame…Audio is often more important here (e.g. video call)…
Joint assessment: combining together
Streaming quality observations
Biggest concerns: asymmetricity + BE
Asymmetric bandwidthIt is the nature of access/subscription (ADSL, cable models)It is what operator wants (pays for outgoing traffic)It is what clients sometimes offer (limit outgoing rate)What can we do? Server farms!Just like in CDNs…
Best-effort InternetQuality degradationReasons? Losses, delays as a result of congestionP2P may somehow decrease these effects…
Measurements 2007-nowSome systems may handle high peer churns effectively
Some may handle 100-200 thousands of viewers
A lot of clients get good quality
Some clients get extremely bad quality
Increase of prefetching period increases qualityOften systems require 10-100 seconds of prefetchingThere is threshold not allowing further increase
Quality degradationPicture freezing as a result of losses (problem of decoders)Results in discontinuity which is very annoying
Mesh topologies are generally better
Quality monitoring system1
Concept: crawling of buffer maps of clientsContinuous monitoring (they used it for PPLive)No additional softwarePassive sniffing
Problems? Only one… protocols are proprietary Does not represent quality… Better call it starving of nodes.
1Hei et. al “Inferring network-wide quality in P2P live streaming systems”, IEEE JSAC, 25(9),1640-1654, Dec. 2007
Improving streaming in P2P
What are the means?A plenty of!
We do not depend on the network operator! Well…We may ask for just not disturbing us with our efforts!
Proactive waysOverlay architectureLayered codingMultiple-description codingTraffic localizationSchedulingIncentive mechanismsServer farms
Active way: monitoring+supporting starving peersWell, we are not ready yet…
Overlay architectureMesh vs. tree
Comparison between these twoIn trees information is disseminated fasterIn meshes reliability is much better
Reliability in tree topologiesMultiple trees!Well, multiple meshes will still be more reliable…
Sometimes referred to as PULL (mesh) and PUSH (tree)
Layered codingPrincipals
n layersone base layern-1 enhancement layers
Usage in P2PTree/mesh carrying base layer is for all to sign forOther trees/meshes are just for better quality
RequirementsTrees/meshes need to enumeratedYou need to follow the order of layersks layer if you subscribed to the previous n-k layers
Two layers
Multiple description codingSimilar principle
n layersone base layern-1 enhancement layerslayer are independent!
Similar usage in P2PAt least one tree/mesh needs to be joinedOther trees/meshes enhance quality
Three layers
Why MDC and LC are so good?The tool behind is path diversity
Excellent for P2P systems multiple trees/meshes!
SchedulingApplicable to mesh systems only
File sharing P2PFile is divided into chunksIt does not matter which of those comes nextFile sharing is delay tolerant
P2P streaming: scheduling windowSequence of packets ahead of the current playbackNeeds to be received to ensure continuous playbackOne of the most critical parts
Scheduling: trade-offsCareful tuning of the window size for two metrics
Level of dissemination of data (LOD)Continuity of playback (COP)
Scheduling window is largeLOD increases1st POV: COP increases as more sources have data2nd POV: COP decreases as the window is larger
Scheduling window is smallLOD decreases1st POV: COP increases as the window is small2nd POV: COP decreases as less sources have data
Which of these dominates in each case? No ideas…
Scheduling: strategiesScheduling strategies
Urgency-basedRarity-basedHybrid approaches
Urgency-basedAsk for those that are closer to the playbackEgocentric disruptive approachLOD decreases, COP increases in the short run
Rarity-basedAsk the rarest block in the windowLOD increases, quality may increase in the long run
Hybrid approach: assign priorities to the packets
Incentive mechanismWhy it is important?
P2P relies on clients contributing bandwidthFree-riding problem: decrease available bandwidth
Philosophy of incentive mechanismsQuality needs to be proportional to the contribution of a peerYou do not contribute, you get nothing
Groups of incentive mechanismsMonetary-basedReciprocity-based
Effect on qualityBalance of upload and download
Incentive mechanism: monetaryMonetary
Virtual currencySpent when getting, obtained when providingCentralized mechanisms using accounting modules
Shortcomings and advantagesAdditional network loadAdditional timing overheadSingle point of failureGood for commercial systems
Could be the only way for future commercial P2P systems
Real money instead of virtual currency
Incentive mechanism: reciprocityReciprocity-based
Peers maintain info about other peers’ contributionsDistributed algorithmDirect and indirect approaches
Direct approachPeer uses its own history of communicationWhat if no such history available (e.g. new peer)?BitTorrent-like system: free-riding is easy
Indirect approachPeer gathers info from other peers tooVulnerable to malicious nodes
Something needs to be done with free-riding!
Traffic localizationWhat is that?
Attempt to localize traffic within domainsAround 90% crosses inter-ISP linksOperators throttle P2P traffic: http://www.p2pon.com/guides/Trying to please networks operators…
Is it possible?Comcast localized 34% in its field trialsGeneral consensus: up to 80% can be localized
What is the effect?Straight effect: localizationSide effect: better quality as only few long-distance connectionsSide effect: high degree of localization decreases quality…
Traffic localization: approachesCaching techniques
Create cache of files nearbyWhere? Operators don’t want to deal with that…
Use of gatewaysNeeds to be very powerful nodesNodes could be too loosely connected
Biased choice of peersPreference is given to local peersHow to identify local peers?
Measurements of RTTIP addresses (prefix matching /8, /24, /13)Special services provided by their partye.g. Internet Coordinate Systems (ICS)
Server farmsWhat is that?
Servers injecting the bandwidth into the overlayCan be done for VOD and live streamingImplemented in most P2P streaming systems e.g. SopCast
Hybrid CDN/P2P systems!
Active quality improvement Basic principle
Monitor quality locallyIdentify moments when it is about to degradeDo something about it! What to do: ask for/contact new peers, contact server farm, etc.
Abstract example