Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

40
Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015 Dmitri Moltchanov, TUT, Fall 2015

Transcript of Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

Page 1: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

Lecture 7. P2P streaming: design aspects and performance issues

Dmitri Moltchanov, TUT, Fall 2015Dmitri Moltchanov, TUT, Fall 2015

Page 2: Lecture 7. P2P streaming: design aspects and performance issues Dmitri 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?

Page 3: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 4: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

Compression basics

Page 5: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 6: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 7: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 8: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 9: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

Temporal predictionRemoving temporal redundancy

Works with digitized macroblocks

Page 10: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

A problem with predictionRecall transmission media for a moment

Loss of a packetError propagation in timeError propagation in space

Page 11: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

Assessing video quality

Page 12: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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)

Page 13: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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?

Page 14: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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?

Page 15: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 16: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 17: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 18: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 19: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 20: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 21: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

Streaming quality observations

Page 22: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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…

Page 23: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 24: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 25: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

Improving streaming in P2P

Page 26: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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…

Page 27: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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)

Page 28: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 29: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 30: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

Why MDC and LC are so good?The tool behind is path diversity

Excellent for P2P systems multiple trees/meshes!

Page 31: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 32: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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…

Page 33: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 34: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 35: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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

Page 36: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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!

Page 37: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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…

Page 38: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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)

Page 39: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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!

Page 40: Lecture 7. P2P streaming: design aspects and performance issues Dmitri Moltchanov, TUT, Fall 2015.

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