Compression and Quantitative Analysis of Buffer Map Message in P2P Streaming System

BM compression is a straightforward and operable way to reduce buffer message length as well as to improve system performance. In this paper, we thoroughly discuss the principles and protocol progress of different compression schemes, and for the fir…

Authors: Chunxi Li, Changjia Chen, DahMing Chiu

Compression and Quantitative Analysis of Buffer Map Message in P2P   Streaming System
Abstract BM comp ressi on is a straightfo rward and op erable wa y to reduce b uf fer m essage length as we ll as to i mprove s ys tem perfo r m a nce. I n t his pap er , we t horough l y discuss t he p rinciples and pro toc ol prog ress of d i ff erent c o m pression schem es, a nd for the first ti me presen t a n origin al com pression scheme w hich can nearly remove all redundan t i n for m ati on from b uf fer message. Theo retical li m it o f comp r ession r ates a re deduc e d in the t h eory o f i nfo r m ation. Through the analy sis of inform ati on con tent and simul a tion with our measu red BM trace of UUSee, th e validi t y and s u periority of ou r c om pression scheme ar e v a lidated i n ter m of comp r ession ra tio . I Backgro und In recent years, P2P strea m ing media sy ste m h as got ten ex plo si ve development. A s an impo rtant a nd hot section i n P2P world, the P2P strea m ing s yst e m is attra cting a l ot research e ye s. Many works suc h as [4]-[ 13] try to characterize the s y st em ’ s features in nature based on network m eas urem ent. Wi t h deep er understand i ng the s y stem, som e s ystem m odels a re propo sed t o imp rove t he system pe rfor m ance i n terms of inform a tion broadcast s pe ed, netwo r k sharing ef ficiency a nd s tartup delay , et c. A lthough s om e of t h e mod els, w h ich are base d on r eal P2 P stream i n g a pp lications, are engi neering feasible , m ajority of them st ay on the authors’ de s k s due t o too far a way to the reality . In 2008, Libo [1] foun d that incre a sing the exch ange ra te of peers’ bu ffe r m a p m essage (BM) cou ld h elp chunk dif fusion. This find opens a no t h er c onv enie n t door for u s t o i m prove the P2P stream i n g s yst e m ’ s perform a nce. Natu ra lly , decreasing the cyc l e of BM e x change wil l increase t he BM pro t ocol overhead i n term of ne tw o rk tra ff ic, which will lead t o uncertain negative ef fects on sy ste m pe r form a nce. Nearly at the same time, we fou nd th at som e m ai n s trea m ASPs i n cluding PPLive and UUSee h a ve re duced th eir BM length wh il e kep t buff er width and BM e x ch a nge cycl e unch anged. O ur find i ngs confir m s that e ven under the s ame BM exchang e cycle as befo re, t he origi nal BM of mo r e t han 80 bytes length has brought non-igno ra ble overhe a d. It give s us t he BM ove r he ad baseline, which a ny perfor m a nce optimi z ation solution mu st be kep t below . Under th is princ i p le, the origin al BM m ust be scaled down . In gene ral, t he re ar e se v eral wa ys t o s horten t he BM, s uch as decre a sing t he buff er w i dth , en large t he chunk size, and c om pressing the bit m ap. B o t h b uf f er width a nd chunk s ize a re the sy ste m design para m et ers, and any slight adjust on t h em m a y a ff ect t he whole situation and bring sy ste m atic c halleng es. I n practice, softw ar e engineers alway s tr y to do as best a s they can, to carefu l ly a nd e m pirically tune the whole s ys tem into t he best situation with the mo s t suitable parame ters. On the oth er hand, following a dif ferent way from the a dju st m ent of t he b uf fer width and chunk size, BM comp ression c an furthe r imp r ove the improvem ents in the ad justments. Fu rt he r mo r e, no any design and perform a nce risk s will be invo l ved in BM com pression. Data com p ress ion is not a new t op ic, but the existing algo rit hm s provide t he universal m ethods which a re not s pecific a lly d esigned for P2 P appli cations. Of course the BM can be com pressed with traditional me t hod s, b ut wh ether it is w ell com pressed? Based on full con sidera tion t o t h e unexp l o re d feathers of BM, we tr y to design m ore powerfu l comp ression schem e, to t heo retically disc u ss t he dif ference of all the BM comp r ession schem es, and t o de sign th e optim a l BM com pression appro ac h. All such questions are very i nte resti ng and i m portant not only t o us b ut also (esp e cially ) to the system ’s designe r and develop er . T o the be st of our know le dg e, the BM com pression issue s h a ve n ever been thought about a nd dis c u ss ed seriously and thoroughly . Compression and Quantitative Anal y sis of Buf fer Map Messa ge in P2P S treaming Sy stem C.X., Li, C.J. Chen , D.M Chiu In the paper , we discuss both how to c om pression B M m essage a nd how well a best com pression method can be reached. Fi rstl y , a fte r a br ief introduct i on of known sc hem es, in cluding the si ng l e BM scheme (SBMS) used i n p ra cti ce a nd the single peer ’ s BM schem e (SPBMS ) propo sed in [2], we presen t a mo re efficien t c om pression m ethod namely paired peer ’s BM schem e (PPBMS) which can thoroughly r emove the redundan t i nform ati on. Secondly , ach ievable compression rate f o r each discu s sed methods are estim ate d under t h e s tationary b uf fer fil li ng assumpt i on. W e assume the b uff er filling is a stationary pr oces s following certain s c urv e, and dedu c e diffe re n t s cheme ’ s co m pression r ate. According t o our a n a ly sis res u lt with UUSee S cu r ve , PPBMS has a sign ificant advan ta ge ove r other scheme s. At last, dif f erent achi evable com pression schemes are si m ulated with our actu al m eas ured UUSe e BM tra ce a nd the quan titative re s ults v ali date t h e validity and supe ri o rit y of our P PBMS. In t he paper , we discuss differen t kind of BM com pression schemes including the single BM schem e ( SBMS ) us ed in p ra cti ce, t he single peer ’ s BM sc heme (SPBMS) p roposed in [2], an d pre sent a mo re effic i ent c om pression m ethod namely paired peer ’s BM sch e m e (PPBMS) which can tho r oughly re m ove the r edund ant i nfo r m a tion. Ba sed on our previous research on t he b uff er fil li ng be hav i o r , a s wel l a s the BM exchange feature, the lim it for each schem e, which is one of th e key issues seri ou sl y con sidere d by system a nd pro t ocol desi gn er , is deduced f o r the first ti m e from the perspective of t he infor m a tion theory . Base o n the limi t, we can d esign a better com pression protocol to i mp r ov e the P2P s ystem performance . Accord ing t o our a n alysis, PPBMS lim it has a sig nific a nt adv a ntage ove r other schem es. At l ast, dif fere n t BM schem es ar e simu lated with our actual m easured UUSee BM tra ce and the qu a ntitative res u lts validate the validity a nd sup eri o rit y of ou r PPBMS. The rem ai ning sections are ar rang ed as follow s: in section i i, the BM s tru c tu re and its exch a ng e proce ss a re dep i cted , a nd existing BM comp r ession method a re expl aine d ; our PPBMS are presen t i n sec ti on iii; in sect i on iv we present a a naly sis m odel to deduce the li m it of diffe re nt BM com pression solu ti on , a nd a s a samp le, the li mi ts a nd overh ea d of all sch emes in UUSee are calcu lated a nd comp are d ; i n section v dif ferent coding s chem es are si mul ate d a nd compared with our me asured BM t ra ce of UUS ee; at last, sect i on v i is a summ a r y . II Ov erview o f BM a n d i t s current s i t uati o n A P2P live s trea m i ng s ystem uses few servers to s u pport larg e numbe r of a udience s (named as pe er). In curren t t ypic al P2P streaming m edia systems, strea m i ng content is cut into continuous blo cks ( or chunk s) tra nsm i tted between peers, each of which is marked by a unique s equence num ber called c h unk id i n m a ny paper . Conten t se rver ( o r se eder) o f t he s ys t em i njec ts chunk s (requi red b y peers) o ne by one into the sy ste m and each p eer cach es t he chunks i n a buf fer org a nize d i n chunk s. A buffer m essa g e (BM) is int r oduced to a bstractly desc ri pt t h is buffer status. Typi call y , BM c ons ists of an offset , which is t he I D o f the c hunk at the b u ffer h ea d, a nd a seque nce of {0,1}, in othe r words, a bitm ap of the b uffe r to dep i ct t he download scen ar io i n this buff er. A value of 1( 0) a t the i th position ind i cates t hat t he chunk with an ID offset+i-1 has be en ( has not bee n) buf fere d i n th e buffer. The length of bitm a p is the peer ’s bu ffer w i d t h. Program con te nt ’s sh a ring and exch anging b etween peers heavily rely on BM re ported by t heir coun terparts. BM protocol overhead is no longe r a n eglig ib le p ar t in P2 P strea m i ng system. Th e BM pro toc ol tra f fic come s fr om the BM siz e a n d its ex change frequency . As we know , t he a bility to resist netwo r k stirri ng be c om es stronger as the buffe r width becomes large r . Thu s, i n order to imp rove t he ca pabilit y of c on ti nuo us pla y back and give use r better watching expe rience, larg e buf fer soluti o n is usually adopted in current P2P streaming s y st em. On t he other si d e of t he c o i n, larg e buffe r le ads t o high p layback d elay and big BM size. U sually the fo r me r isn ’t a f atal pe rfor m a nce factor bec ause the audiences are in sensitive to the del a y in one-w a y broadc asti ng vid eo prog ra m . However , the larg e BM i nc reases the protocol overhe ad. Libo i n his paper [1] find s t he relati on be tween t he cycle of BM ex chang e a nd t he chunk dif fusion speed. F or better ne tw o rk s haring e nvi r onm ent, pee r wishes faster BM upd ati ng while it will lea ds to mo re ove r he ad. What is the righ t si ze an d right cycle is a v ery complex issue. In eng ineering practice, eng ineers co ntinue to adjust it to a balance . A cc ord ing to ou r me asurement , for U USee and PPLive respectively , t he BM size is a bout 80 bytes a nd 250 byt es in t heir ear ly version, and t he exch a ng e cycle is a bout 5s a nd 4 s. Assuming a pe er keeps 30 connec ti on s with other peers at the same ti me on a v erage, t he protocol overhead is about 7.68kb/s a nd 30k b/ s respec t ively . Con si d eri ng t he general case of 512 kb/s ADSL a cc ess s peed with 400kb/s video strea m , such a n ove r he ad cannot be overlook ed. In 2009 we f ind t he m ai n strea m ASPs (PPLive a nd UUS ee) ha v e redu ced t he ir BM s ize w h il e kept buff er wid t h and BM exchang e c yc le unch ange d . O u r find conf ir m s t hat even unde r the sa m e BM exch a nge cycle as bef ore, the orig inal BM of m ore th a n 80 byt es length has brough t non -i gnorable ove r head . I t also give s u s t h e baseline of BM traffic ove r he ad. The BM tra f fic cost i n a ny perfo r m a nce opti mizatio n solution must not be la rge r tha n th e baseline. BM com pression is a straigh t forw ar d and operable way to re d uce this ove r head a s well as to imp rove syste m pe rfor m a nce. However , t o the best of our knowledg e, t his pro ble m has neve r b een though t about a nd d iscusse d seriously a nd t horough ly . Following we w ill discuss some key and in t erest i ng iss ue s, i ncluding diff erent BM comp ressi on method s , t he the o retic c om pression ra tio and the optim al a chiev able coding schem e design. III BM co m pr ession so l ut i o n s In early P2 P strea m i ng system , t h e o riginal BM describing the content buffer is exch anged betw ee n peers without any compression . I n furthe r eng i n eering practice a nd study , people fi nd su c h a n orig i n al BM sc hem e l eads t o heavy overhead and try t o l ook fo r comp r ession so l ution s. As desc ribed a bov e, BM c ont ai ns two most important elemen ts : offse t a nd bitmap. Off s et usually is 4-byt e in size, and bit m a p inc l ud es ma ny bytes. In our fo llowing discussion , we m ai nly focus on th e c om pression of bit map a nd a ssume of fset is exc h a ng ed directly . 3.1 Sing le BM schem e (SBMS) Thi s is the si mplest a nd m ost direct way t o reduce the BM size. Because the comp r ession proc ess is base on e ac h sing le BM, we name it single BM schem e (SBMS ). The prim a ry purpose of BM exc hange is to tell other peers how on e peer ’s buf fer is fill ed. As m entioned a bov e, a bitma p of a {0,1} sequence is introduced to represent t he filling statue a nd is exch a ng ed between peers. In a practic al strea m ing s y st em , chunk s a t po sitions n ear the buff er he a d have been in the system m uch ear lie r than tho s e near the buf fer tail; hence the position clos er to the head has larg er chance to be fill ed. In oth er words, a bit position at b uf fer head has la rg er pro bability t o take the value 1 while a bit pos ition at buffe r tail h as larg er p r obability t o be 0. Figu re 2 is me as ured f illi ng p r obabili ty vs posi ti on of UUSee . SBMS ju s t ta k es a dvan ta ge of t h is fact of bitm a p to c om p ress each sing l e BM, a nd es pec iall y , both comp r ession and decom pressi on proc ess don’t dep end on last o r a ny othe r BM. The BM comp r ession me thods used i n engineering practice generally belong t o this category . In m i dterm of 2009, w e firstly find certain com pression m ethods are ap plied in U USee and PPLive . In later of 2009, we s uc cess i n a naly zing t he com pression proc ess of UUSee , where a n origi nal bitm a p of mo r e than 400 bits can be redu ce to 17.5 bytes long on ave ra ge by certain variant of LZ and run-length a lg orithms and each BM can be d ecompress ed independently . The data used in our following theoretic a naly sis a nd s i m ulation is based on t he decom pression of the m eas ured BM of U US ee. In an i nv estigation shortly afte rwards, we ge t to know PPLive adopt 2 leve l huf fman algo rit hm t o proc ess their BM. In brief, both of them ar e base on diffe re n t posi tions’ 0/1 probabili ty statistics in t he origin al bit m a p, while the strong c orrel a tion bet ween adjacen t BMs are no t realized. In general, S BMS merely use the general data comp ression algorithms in comp r essing the BM and doe s n’ t make a ny othe r breakthrough and i nnovation . Of c o urse t he biggest strength lies in its simpleness . 3.2 Sing le Peer ’s B M sch eme (SPBMS ) W e name it as t he si ng l e peer ’s BM sch eme (SPBMS) as the comp ressi on is base d on t he co rrelati o n between t wo con tinuous sending B Ms of a sing le peer . 1) The Principle A seemly triv ial obse r vation i n buf f er filling is that, once a buf fe r position is filled , it will be fil led forever . In other words, only t hose bit positi o ns with v alue 0 in curre n t repo rt ed bitmap m a y ch a nge t he ir values to 1 a t f ol l owing reported bit m a ps. Thu s this se emly trivial obse r vation will in tr oduc e a new non-trivial c om pression philosop hy: Si ngl e Peer ’s BM schem e (SPBMS). In this schem e, a pee r will st op reporting those positions that have ever been n otified wit h v alue 1 a t prev i ous BM sending. Thu s, the SPBMS fo llows this princ i pl e : Prin ciple 1: A p eer needs not t o s end m essa ge a bou t a position further on ce a value 1 has been sent in this posi tion. Then w e will have diffe rent choices on how to s end t he re m aining pos itions wit h value 0 in prev i ous bit m a p. It seemingly has less a mou nt of info r m a ti o n i f we j ust send the po sitions with value variatio n from 0 t o 1 in c urrent BM. H owever , it s hould be noted t hat there are two t ypes o f info r m a ti on t o be sent for eac h buffe r posi ti on : the value 0 o r 1 and t h e location . Fo r inst ance, bitm ap itself just u ses the offse t a nd bit sequenc e t o m a ke th e value and posi t ion self-explan at ory . If only the p ositions with value variation are to be sent, we ha v e t o code the location s i nfo r m a tion and i t see m s i nef ficiency a nd complex. On the other ha nd , in SPBM S, the current bitmap are cond ensed into a short one which consist s of bit value sequence of all the position s with value 0 in prev i ous bit m a p. In orde r to l o cate t he position of each bit, a speci a l integer set named a s s uppo rt s et ( SS) is in tr oduc ed. I n th eor y , t h e SS is a locations ( chunk id ) set of all the chunks which have not b uf fered in the BM s ende r . All location value s i n the SS a re in ascending orde r . In each round, sender will extract the bit value sequence a s the c om pression sequence from i ts c u rr en t bitma p a cco r ding to th e l oc a tion s sta rting fr om h ea d of SS, t h e n all t h e locations which have buf fered i n cu rre nt bitma p wil l be remov e d from t he SS; the rec eiver wil l ret rie ve th e bitm a p from the com pressed bit seque nce a cco r ding t o the l oc ati on s beginning from t he head o f S S sequen t ially , then all the lo cations with bit valu e 1 in cu rr ent re c eived bitmap wil l be remov e d from the SS. Fo r c o rr ec t encoding a nd decoding , t he SSs will be updated c ontinuou sl y ba sed on eac h bitm ap, a nd b o t h t h e s ender a nd receiver m ust keep t he sa m e s up port set a t the sa me ti m e. Thi s m ea ns a decom pression peer has to keep communication with t he comp r ession peer from t he ve r y beg inning, and in practice s uch a requ irement can be met by either periodically announcing a com pressed BM o r t he cu rre nt s uppo r t set. The proposal pr opos e d b y [2] in 2009 is one t ypi cal i mplemen tation of SPBMS. Simulation proof s it can get m ore a dv a n tage than the implem entations u s ed b y PPLive or UUSee. T o t h e best of our knowledg e, they for the first time put fo rward t h e compression method s pecif ic t o BM exch a ng i ng. How e v er , t heir work isn’ t tho r ough e nou gh. They give neither a strict analy s is i n th eor y nor a proof in practi c e on their a lgo rit hm . Most of i m porta n t, be cau se in SPBMS wh a t a pee r se nds a lw ays be yond wh at the receiving peer needs i n B M exchang ing, a ny solu ti on base d on it is no t an ultim at e one . The re fo re, a qu estion of the op ti m u m schem e is p resent. What are the best comp ressi on schem e and solution ; a nd how m a ny gains can b e brough t with it ov er oth er s olu tions? All of the se que stions ar e very interes t ing and worth deep l y study i ng. Th e y are not only the key points t h at we wil l m a ke effo rt to resolve , b ut also the innovation of this paper . 3.3 Paired pe ers’ BM schem e In this paper , we for the fi rst time put forward a BM com p ression sc hem e called paired peer ’ s BM sch eme (P PBMS ). The na me comes fr om t he fact it can condense a bitm ap b y r emov i ng the redun dant inform ati on bet we en the pairwise pee rs ’ ex ch a nged BMs besides el i m i nating the redun dancy between a p eer ’ s a dj acent BMs. 1) The conception and princ i p le On clos er inspe ction of in teractive behav i or of p aired p eers, we f i nd anoth er seeming l y in si gn i fic a nt fact: once a buff er position is filled, its peer will not care fo r this posi t ion a ny mo r e whe t h er the same p osition is filled or not in other pee r s. In o t he r words, a peer only c on cerns abou t t h e s ituation of tho s e b uf f er po siti ons with value 0 in his ow n bitmap i n other pee rs. Thus th is o bser vation a long with the princip l e 1 w i ll i ntroduc e anothe r i nnov ati v e com pressi on phi l osoph y: Paired Peer ’ s BM sch eme (PPBMS). In t his scheme , a peer will st op r epo rting t ho se pos itions t h a t have e v er been noti fie d with value 1 in either his own previou s sending BM or his conn ected peer ’ s BM. Diff erent from SPBMS, PPBMS takes a p eer ’ s counte rpart ’ s needs i nto con sidera tion and t he result compressed BM is specific to the coun t erp ar t of a sender . Intuitionally th e sc hem e m a y remove th e redundancy t o a larg e extent. Thu s, the PPBMS fo llows anothe r princip le besides princ i p le 1: Prin ciple 2: A pe er needs not to se nd me ssage about the po siti o n t o his paired pee r f urther after rec eiving a v a lue 1 in t hi s po s ition from his p aired peer . Due to t he sa m e reason discussed ab ove i n SPB MS, i n P PBMS the peer will se nd a ll t h e bi t value sequence extracted fr om his bitmap ready t o be se nt correspond i ng to all t he posi t ion s with value 0 i n either a sender ’ s previou s bit m a p or the la test rece i v e d bit m a p. The SS with ascending so rte d values is a lso nece ssar y for correc t compression a nd decom pression, but has som e fund a men tal diffe rent m ea ning a nd m a nag ement m echan is m . F irst, th e SS in PP BM S is a lo cations ( c hun k id ) set of a ll th e c hun ks which have not buff ered in b oth paired peers; second l y , both r oles (BM se nd er/receiver) of a peer will s h ar e the sa me S S; thirdly , c onsid eri ng t he SS syn c h roniz atio n, the processes of BM exch a nge in two direction s ar e depend ent to each other . Excep t those dif ferences , S S use s t h e similar dyn a mic form a ti o n/ u pdate mechan ism. Fo r correc t e ncoding and de c od i ng, the SS w ill be upd ated co ntinuou sl y based on each bitm ap exc hang e i n both direct i ons , and both the peers mu st keep t he sa me suppo rt set at the same time . This re q ui res t he B M exchange t akes pl ace i n single proce s s from the very beg i nning i n both di recti on s bet ween paired peers. I n e nginee ri ng design, c on si d eri ng network c ondi ti on s ( lo ss and de la y) a nd concurren cy of BM exchang e, we can decoup le the correlation b y a dopt i n g m ul tiple ind ependent SSs, eac h of w h ich is for one time of BM e xch ange. The c ore idea is: based on b oth th e re ce i ver ’ s latest c onf ir m a tion a bout which BM ( called l oc al BM r eferen c e or LBMR) se nde r has reported and t he latest received BM from the rec ei ve r (called c oun ter p ar t BM refe rence o r CBMR ), the s ende r comp r esses his new BM and s en d s it out. Of course, al ong with t he com pressed sequence , oth er inform ation suc h as un ique indexe s of LBMR and CBMR needs to be transf erred for locating the SS decom pression needs . 2) The Basic Protoco l Prog ress The ba sic pro t ocol is the same as that of SPBMS ex cept t hat in PPBMS b oth r o les (BM sende r/receiver) of a peer share the sa me SS, hence the details o f prog ress is omitted he re. 3) The consistency in t he SS of paired pe ers Unde r the sam e a ssumptio ns as in SPB M S excep t th at in PPBM S b oth roles (BM sende r/receiver) of a pe er share the sa m e S S, we define |v| = k fo r a binary sequenc e v =( v 1 , … , v k ). Init iall y , SS L A = L B ={all location }. Assuming BM exchange is starte d at time t as peer A sends his BM to B, then – A sends  A ( t ) and bit sequence ( b 0 , … , b N  1 ) to B – L A ={ l   A ( t ) & the locations of t h e chunk that pee r A has not buff ered at time t } – L B ={ l   A ( t ) & the locations of t he chunk that peer A has not buf fered at tim e t } – S o L A = L B = { l   A ( t ) & the loc ati ons of the chunk t hat pe er A has no t b uf f ered at tim e t } Assum e peer A send s to B at time t 0 and L A ( t + 0 )= L B ( t + 0 ), th en B send s to A a t time t , the n – B sends  B ( t ) and bit sequence v =( v 1 , … , v m ) to A – L et L B ={ l  L B ( t + 0 ) : l   B ( t )} in asce nding orde re d , L B ( t + )={ l j  L B : v j =0, if j <|v| } – L et L A ={ l  L A ( t + 0 ) : l   B ( t )} in ascend ing orde re d, L A ( t + )= { l j  L A : v j =0, if j <|v| } – S o we st i ll have L A ( t + )= L B ( t + ) W e can draw the sa me conclu s ion if B s end s to A at time t 0 a nd L A ( t + 0 )= L B ( t + 0 ), th en A se nd s to B at time t . The re fo re, the consistency i n t he SS is proved . IV The Analysis of Di f ferent Schem es in Th eor y In thi s section, we will di s cuss the comp r ession l i m it rati o of dif ferent schem es, as well as t h e pro toc ol ove rhead of BM exchange in theory . All the issues are v er y interesting and i m porta n t not only t o us but alsoto the s y st em ’ s designe r and developer . 4.1 T heoret ic An al ysis In our previou s res earch [ 3], we find a nd valid a te buffer fill i ng i n P2P strea mi ng s y st em is a station ar y process f o ll owing ce rta in s curv e. Fig. 1 depic t s the S c u rve of U USee c lien t measured in A pril 2009. The w ho le content b uf fer is broken down into m a ny s equen tial bl ock s ( chunk s) a s th e horizontal axis shown , and the vertical axis is the fil ling probability of each blo ck position. Fo r a given stable peer , the s c u rve is inde p endent of any obse rvation t ime a nd t he offs et la g t o a ny oth er peer . Wi th this know ledge, t h e comp ress ion r ate of dif ferent schemes can be deduced based on in for m ati on theo r y . F igure 1. the di f fusio n S curve of UU See Fo r furthe r theo retic analy sis, w e introduc e the following def i n i tion s and assumptions (see Fig . 4 ) : a) BM in cludes an of fset  and a bitmap (b 0 , … ,b N  1 ) with the buf fer leng t h is N chunks ; b) Th e buf fer filling pro bability is { p i , 0  i  N-1 } c) T is the p eri od of BM exchange of a pee r , and  is the ex change delay betwe en adjacen t peer s of both peers’ from one peer , say B , t o another : if say pee r B se nd s its BM t o its coun terpart A at tim e t + iT , i=0,1, … , then A send s to B at time t + iT +  , 0<   T , i=0,1, … ; d) T o si m plify the analysis, we assume the bo t h A and B have the sa m e playbac k delay , i.e. of fset  A =  B at a ny ti me . 1) The analysis of S BMS Ac cor d i ng to t heo ry of i nfo r m ation, we ca n reg ar d t he bitm a p of a BM as th e c om bi n ati on of N binary source { S i , 0  i  N-1 }. As each chunk’ s downlo a ding can be a ff ected by m a ny factors in cluding network c ondi ti on s, local data sharing , chunk fetch i ng policy , etc., fo r pee r in stable cond ition, it is reason a ble t o assume the bin a ry source s are independen t to each othe r . The re fo re, we have the i nform ation qu a ntity of comp ressed bit se q uence i n S BMS 2) The analysis of SPB MS Refe rence to the two continuous B Ms of a pe er in Figure 3 , any t wo binary sources with T c hunk s interval between BM 1 a nd BM 2 , ( S i in BM 1 , S i+T i n BM 2 ) T  i  N-1 have strong c o rr elation . Because the S i a nd S i+T correspond t o the sa m e c hunk , if S i =1 in BM 1 , t hen S i+T i n BM 2 m ust be 1; i f S i =0 i n BM 1 , then S i+T i n BM 2 m a y be 1 with ce rt ain pro bability . F or si mp li city , we define , p(i= 1 ) a s the probability the chunk a t p osition i has been … S N - 2 S 1 S 0 S N - 1 BM’ s bitmap F igure 2. Inf ormat i on mod el of SBMS F igure 3. In form ation mod el of SPBMS … S N - 2 S 1 S 0 S N - 1 T N-T T BM1 Buff er head t ai l … S N - 2 S 1 S 0 S N - 1 t t+ △t BM2 buf fered in BM1, p(j=1) , whe re j=i+T , as the pro bability the chunk at position j h as been buffered in BM2, a nd sym b ol p(j=1/i=0) a s the c o ndition probability t hat the sa me chunk a t position i i n BM 1 is not buffered b u t b uf f ered at posi t ion j i n BM 2 . C onside ri ng t h e ergodic ity of buffe r filling, we have fo llowing equation : ) 1 ( ) 0 / 1 ( ) 0 ( ) 1 (        j p i j p i p i p Le t p i = p ( i =1), q i,j =p ( j =1/ i =0), abov e e q uation c an be written as: j j i i i p q p p   , Then , we get i i j j i p p p q   , The re fo re, the inform ation quantity of the com presse d bit m a p in SPBMS is 3) The analysis of PPB MS F igure 4 . t h e B M excha n ge  be tween peers inPPB MS It is a little c om plex to anal y ze the PPBMS. Let’ s recall that in PPBMS only the statuses of tho se po siti ons which h ave no t b een b uf fered i n b oth paired pee rs ’ bitm a ps s hould be reported. See ing Fig. 4 , first, let’ s th i nk about peer A sends his B M to peer B a t time t . A ’s previous BM (LBMR ) oc curs a t tim e t-T i n a ll cases, wh ile occurring time t-  of B’ s last BM ( CBMR ) will be dif ferent with di ffe re n t  selection. So, the prob abi lity to ex change infor mation about a position k in A ’ s BM is Pr(p osition k -T is 0 in LBMR) × Pr(position k -  is 0 in CBMR) . On t he other hand, at the time t pee r B sends his BM to peer A, B’ s last BM oc cur s (LBMR) at ti m e t-T in all cases, w h ile A ’ s last BM (CBMR ) ti m e t-( T -  ) wil l be dif fere n t with dif ferent  selection. So, the proba bi lity to ex c hange infor mation about position k in B’ s BM is Pr(position k -T is 0 in th e L B MR ) Pr( po sitio n k -(T -  ) is 0 in CBMR) . Obviously , in PP BMS, the e n tropie s in t wo dir ections bet ween paried peer s will be diff erent, and r elated to the e x change time  . See the infor mation model of PPBMS in F ig.5, peer A wi ll send his B M to B  time la ter after r eceiving peer B’ s BM, and corr espo ndingly peer B will send his BM to A T -  time la ter after r eceiving peer A ’ s BM. In t he case of A to B, BM 1 and BM 1 ’ ar e the LBMR and CBMR of peer A re spectively , and BM 2 … S N - 2 S 1 S 0 S N - 1 … S N - 2 S 1 S 0 S N - 1 N-   BM 2 of A BM 1 ’ of P eer B … S N - 2 S 1 S 0 S N - 1 BM 1 of P eer A time t 1 t 2 t 3 T F igure 5. In form ation mod el of PPBMS ar e r ea dy to be sent. Clear ly , the in for mation quantity consi sts of thr e e par t s: the comple te appending part whi c h doe sn’t exis t in LBMR and C BMR; the par tially appending part which is e ver r eported in CMBR but not in LBMR; the upd ate d part which are ever r eported in both LBMR and CBMR. A cc or ding to theor y of inf ormation, we can dedu ce the amou nt of inf ormation In dir ection of A to B : Corr espondingly , in the rev er se direction B to A In f act, we are mo re in tere sted in the a verag e entr opy betw een pair ed peers, i.e., 4.2 th e Inform ati on Qu a nti t y base d on UUSee ’ s Diffus i on S curve In gen eral, t he dif fusion (S) curve is easy to obtain by P2P ne t work me asurement a n d S curve fit ti ng , while we can’ t g e t the c l o s ed - fo r m soluti o n for t he in for m a tion qu a nti t y of diff erent schem es. Instead , we adopt numerical analy sis method i n our fu rther study . Based on our BM tra ce , we fit t he diffu sion S curve a s t he 2-segm ent filling cur v e s hown in Fig .1. Su bstit u ti ng t he fit t ing curve into th e i nfo r m ation quantity function s, we can easily calcu late th e inf o r m ation content. 1) Cu rve o f PPBMS In g eneral, the paramet ers i nvol ved in a bov e function, in cluding t he buffer width N (=456), cyc le of BM sending and b uf fer filling p r obability , a re all P2P system design parame ters, while the exch a ng e ti m e delay  used in PPBMS is not. S o, before comp a ri ng diff erent sc hem es, we’d like to discuss one intere st ing question, i.e. how the valu e of exchange ti me delay  will af fect the info r m a ti on qu a ntity of PPBMS and what is the m i n i m u m v a lue. (a) The one -wa y cu rve (b) two -way on ave ra ge cu rves F igure 6 . t h e info rm atio n co nt e nt of PP BMS Fig .6 dep icts the inform ati on con t ent curves of PP BMS in one -wa y and t wo-w ay average m ode for diff erent  and T . I n t h is figure, t he horizon tal axis is the exchange time de la y  , a nd the ve rti cal a xis is the i nfo r m a ti on quantity; diff erent li n e sta nd s f or diffe re n t BM sending c ycle T , which is s uccessively r ising with 8 c hunks for curv es fr om b ottom to top respectively; the off set lag = 0 betwee n b o t h peers in a ll cases. I t needs to point out t h a t the inform ation con t ent of t he paired - peers are sym metric with the c enter  = T/2 in t he Fig.6(a). Dividing t h e sum of the bo th symm etric values by 2, we ge t t he cur v es i n Fi g .6(b) . Observ i ng these cur v es, we have follow ing findi ngs: i) Th e inform ation quantity is a certain increm e nt function of BM’ s sending cycle T for any given exch ange time delay  ; ii) T he inf o r m ation qua nti t y is also a certain mono t one in crement f un cti on of  f or any given BM’ s T ; iii) For a n y given pe ri od T , the inform ation c ontent has the minim a l value, which wil l b e quoted in followin g com parison, when exchange time delay  =0 ; iv) The sh apes of bo t h one-w ay a nd two-w ay cur ve s seem alike except the two-way curve is m ore flat. W e think the sh ape of the cur v es is m ai nly a f fect e d b y the dif fusion S curve , ho wever , the m ore dee p reasons are to be left to our fu t ure research . 2) Com parison a m ong dif ferent BM sch emes F igure 7 . Comp ariso n amo n g all sc h emes with UU See W e draw the i nfo r m a tion content curv es of S BMS , SP BMS and PPBMS in one Fi g . 7 for pe rfor m a nce c om parison. Obv iously , SBMS has a con sta nt value of 77 bits; the curv es o f both SPB MS and PPBMS see m to be ce rta in logarithmic func tions of BM se nding period T . Sign ificantly , for a ny g i ven BM s ending cycle T , our P PBMS has absolutely advantage over other com pression sc hem es. For accu ra te comparison , we calculate the value s with the most often used samp les of T in table 1 , where we can see, from the compressi on rate perspectiv e, our PPB M S can ach ieve t h e best comp r ession ratio and it has a gain of 42% ove r SPBMS, and 68% over SB M S on ave ra ge i n t h eor y . Because PPBMS nearly re m ove all redund a nt i nfo r m a ti on of BM, t he v alues with  =0 can seem as the comp r ession l i m it in theory fo r P2P strea m ing system. T able 1. the theo r etic info rm atio n qu antities and t h e gain o f PPB MS BM send i ng pe ri od (chunk s) T=8 T=16 T=24 T=32 A verage SBMS (bit) 77 77 77 77 SPB MS(bit) 28 41 49 54 PPB MS(bit) 15 23 29 32 gain over SPBMS 0.45 0.43 0.42 0.41 0.42 gain over SBMS 0.80 0.70 0.63 0.58 0.68 3 BM p rotocol overhe a d comp ar isons W e def i ne BM protocol overhead as t h e si gnal ove rhead i nt roduced b y BM exchange in t er m of network tra f fic in a c ertain period . As we know , wit h sm al l BM sending period T , we h ave sm all comp r essed BM size but high frequency of BM exchange ; whi l e fr om large T , l ow frequen cy of BM exchange but big c om pressed BM size m ay be r esu lte d . So, we want to inv esti gate the overh ea d and get t he tradeof f between the BM s ending c ycle T a nd t he com pression BM s ize. All three sc h emes’ ov er he a ds, which are calculated with the inform ati on quantity divid e d by its co rres p onding BM send ing period T , are dawn i n Fig. 8 , a n d table 2 show s the ove r head s wit h typ ical BM sending cycle T . W ithout any knee po i n ts expe cted, a ll t he overheads’ curve s ar e monotone de scent function of B M sending cy cle T . Com paring all t he ove rhead curv es, although o u r PPBMS overhead r educ t ion see m s m ai nly in t he head , i n fact e v en at T =400 the reduc ti on gain ov er SPB MS still reach up to 35%. Ac cor d i ng t o libo [1], increasing the frequency of BM exch ange is h elpful t o i m prove t he P2P s yst em pe rf o r m a nce. Setti ng the overhead of SBMS a t T=22 as th e criterion, w e can see the BM send ing frequency can be i m proved 2 times faster in SPBMS while nearly 20 times faster in our P PBMS. Th erefore, the si gn i fic a nt com pression advantag e of PPBMS has be en proved . F igure 8 . Comp ariso n amo n g the ov erh ead of all schemes T able 2 . the theo r etic o ve r h ead and the g ain of PPB MS sign al c o st (bit/per chunk time ) schem es BM Sen di n g Cycle T=8 T=16 T=24 T=32 T=40 ave ra ge SBMS 9.59 4.79 3.20 2.40 1.92 SPB MS 3.53 2.57 2.05 1.70 1.45 PPB MS 1.94 1.46 1.19 1.01 0.88 gain over SBMS 0.45 0.43 0.42 0.41 0.40 0.42 gain over SPBMS 0.80 0.70 0.63 0.58 0.54 0.63 V S i m ulati on a nd validation with m eas urem ent BM trace Based on our actu al m easured UUSee BM i nte ractive trac e, we simulate d i f ferent operational BM scheme s’ implem entations and try to use t he quanti ta tive results t o validate the validity of our PPB MS. The BM tra ce us e d in ou r simulation is extracted from t he session with the longest life i n our UUSe e client me as urem ent dataset in April 2009. The trace with 4689 BM records lasts for about 1 hour a nd 16 minut es, and all records ar e comp r essed by UUSee with certain LZ and run length algo rithm according t o the SBMS . By reverse e ngin eering m ethod, we are s ucce ss t o decomp r ess it and g et the non-comp r essed BM sequence, wh ich is u s ed in the following simul a tions of SPB MS a nd PPBMS at last. Ac cording t o our re v erse e ngin eering a naly sis, on a ve ra ge, the length of the non-comp r essed bitmap of a BM is about N=54.4 bytes which is compressed to 17.5 bytes long as Fig . 10 (a) shown, t he BM sending c yc le is about T =20 chunk s, and t he exc hang e time  =5chunks. 1 th e SPBMS im pl emen tati on The method proposed by [ 2] in 2010 is one typical implem entation of SPBMS. S eeing Fig. 9 , acco r din g t o this method , only follow ing i nform ati on n eeds t o be re ported in the c om press ed BM: i) the c urren t statuses of chunks whi ch ar e no t buffered in p revious BM; ii) th e statue s of the appe nding chunks i n curren t BM. Fu rt he r mo r e, w e tr y t o c om press the bit sequence output by SPB MS with run-length /Huffm a n a nd arithmetic c oding , and expect a s hort bit s equence. It needs to poin t ou t we ha ve re m oved all the dupl icate BM re co r ds bef o re feeding t he trace i nto t he SPB MS implemen tati on. The si m ulati on result is s hown i n Fig. 10 (a) and table 3 . As we can see, t h e a verag e BM leng th with SP BMS is 4.03 byte s ; with this ou t put sequence , the length wi t h run-length , Huf fman and a rithm etic coding is 9.2, 3.8 and 5.7 byt es. It seem s a con tr adiction that the simu lation result has s m aller size t han t he t heo ret ic l imit, b ut i t should be n oted that the si m ulation result i n t he table is only t he bitm a p i nfo r m ation of a BM. Considering the com pl exity of real netwo r k cond itions i n cluding packet loss and r etran s m issi on , network delay , a s well as th e BM’ s tim eliness, som e o ther bytes, including t he BM’ s of fset, its r eference BM and the confir m ed received BM, shou l d be i n troduced to locate t he bitm a p of a BM. In gene ra l, the s e l oc ati on i nform ation ne eds abou t m or e than five bytes. In addition, t he re is ne ar ly no room to f urthe r comp ressi on with RL ,Huffm a n or AC al gorithm s a fte r SPBM S according t o the si m ulati on. Referenc e t o Fig. 12 (a ), th is m aybe m a inly ascribed t o fact that most sym bols of the SP BMS seq u ence are random enough . T able 3 . The size st atistics in simu lation uni t: bytes Schem es Th e Lim it Basic leng th Run -Length (RL) Huf fm a n after RL Arithm e tic Cod i ng Origin al - 54.4 - - - SBMS 9.59 17.5 - - - SPB MS 5.70 4.03 9.3 3.8 5.7 PPB MS 3.27 2.6 6.4 2.6 - F igure 9 . t h e sc enario of SPBMS (a) SPBM S simulation (b ) PPBMS si m ulation F igure 10 . the simulatio n results 2 th e PPBMS im pl emen tati on Ac cor d i ng to PP BMS, in a typ ical im pl emen tation, the sende r only need s to report the statu ses of t h ose positions which don ’ t buf fer in both LBMR and CBMR. For bet ter un derstand the proc ess, we draw a sce nario in Fig. 11 . In ou r simulation, f o r simplic it y , we assume there is no tra n s m issi on delay a nd l os s i n BM exch a ng e, thus we can simply use t h e last sent BM and last rece i ved BM as the LBMR a nd CBMR re spectively . 1 T N-T T Buff er head t ai l 1 1 1 1 0 1 1 0 0 1 1 1 1 1 1 0 1 1 0 0 1 1 1 0 1 0 0 1 SPBMS output 2 1 1 2 then run - length/ Huffman or arithmetic c o ding… t 0 t 1 time 1 BM 1 BM 2 to be se nt F igure 11 . The sce n ario of PPBM S The simulation result is shown in F i g. 10 (b) and table 3 . The ave ra ge BM l ength with PPB MS is 2.6 byte s; with this o utput seq uen ce, the le ng t h with ru n-length a nd Huf fma n is 6.4 and 2.6 byt es respectively . D ue to the sa me reason as di s cussed in a bove section, t he s imulation r esult has sm aller size t h a n t he theo retic limit. I n real i m plementatio n, s om e extra lo cation inform ati on in cluding the BM’ s of fset, its reference BM and the conf i r m ed received BM, wh i ch usually n ee ds abou t more than five byte s, s hou l d be append ed. In addition , no m a rgin i s l eft fo r R L a nd Huf f m a n algo rithms acco r ding to the sim ulati o n, a n d Fig. 12 (b) shows th e symbols dis tributi o n. (a) Sym b ol distribu ti on i n SPB MS (b) Sym b ol dist rib ution i n P PBMS F igure 12 . The sy m bo l di st r ibution Through our si m ulati on , we can see our PPBMS get mor e than 35% c ompre ssion a dv antage ove r SPBMS in the same c ondition s and the quantitativ e re s ult v alidates the validity of ou r PPB MS.s VI Summary BM comp r ession is an in teresting a nd i m portant issue which has neve r be en though t a bou t and discu ss ed seriously a nd thor o ughly . I n this paper , w e discuss diff erent kinds o f compression schem es and propo s e a mo re powerful and engineering operation a l compre ssi on sche m e – PPBMS; Through profound anal y sis in theory o f i n for m at ion conten t and simulation with our measu red BM trace of UUSee, we valid a te the validity and s up eri ority of our PPBMS in comp r ession ratio. In ou r f u rt he r st udy , we will continue t o res olv e o t h er issues presented i n th is p aper . Refe rence [1] Ch en Feng, Baochun Li , B o Li. "Und erstanding t he Perfo r m a nce Ga p be twee n P u ll-based Mesh Strea m i ng Protoco ls and Fundamen tal Limits," in the Proceed ings of IEEE INFOCOM 2009, Rio de Janeiro , Braz il, A pril 19-25, 2009. 1 T N 1 1 1 1 0 1 1 0 0 1 1 1 1 1 1 0 1 1 0 0 1 PPBMS output 0 t 1 t 2 t 3 tim e 1 1 0 0 0 1 1 1 0 0 1  1 BM 2 of A to be se nt BM 1 ’ of P eer B (CBMR) BM 1 of P eer A (LBMR) 1 0 1 [2] Guang qi n g Deng, Yunf ei Zhang, Chunxi Li, C h angjia Chen , "A bitm a p cod i ng m ethod f o r P2P st rea m ing protocols",in Proc. of CAR , 2010 [3] Y . Chen, C. Ch en and C. Li, “Measur e and Model P2P Strea ming S ystem b y Buff er Bitmap” , HPCC’08, Sept. 2008, [4] D. Qiu an d R. S ri kant, Mod eli n g and perform a nce an alysis of bitt orren t-like peer-to - pe er ne tw o rks. I n : Pr o ceedings of SIGC OMM 2004, Portlan d, Oregon , USA , 30 Auguest -3 Sept ember, pp. 367-378 [5] F. Pi c colo , a n d G. Neglia, Th e effect of hete roge neou s link capaciti es in bittorrent-lik e fi le sh a ring s yst e m s. In: Proceeding s of Ho t-P2P 2004, Vo l endam , The Nederlands , 8 Oct o ber 2004, pp . 40- 47 [6] F. Clev enot, P. Nain , and K. Ross, Mult iclass p2p netwo r ks: S tati c res ource allocation fo r serv ice d ifferentiation and bandwidth dive rsity, Perfo r m a nce Ev a luation 62 (1 -4) (2005) 32-49 [7] R. Kum a r, Y. Liu, and K. Ross. S t ochastic fluid theory fo r P2P stream ing system s. In: Pro c eed i ng s of IEEE I NFOCOM 2007, An chorage, A K, 6-12 May 2007, p p. 919 -927 [8] S. L i u , R. Zh a ng -Shen, W. J i ang, J. Rexfo rd, and M. C h iang, Pe rf o r m a nce bound s f o r pee r- assisted live stream i ng . In: Proceeding s of Sigm etrics 2008, Ann apolis, MD, U SA, 2-6 Jun e 2008, pp. 313-324 [9] Pai V, Kum ar K, Ta m i l m a ni K, et a l. Ch ai n saw: eliminating tree s from ov erlay multicast. Pro c eed i ng s of IPTP S 2005, Peer-to -Peer Systems IV . Vol. V olume 3640/ 2005. Springe r Berlin / He idelbe r g, 2005:127-140. [10] Zhang X, Liu J , Li B, e t al. Coolstream ing/donet: a data-d riven ove rla y ne t work for pee r- to -peer live m e dia stream i n g. Proceed i ngs of I EEE/INFOCOM'05, Miam i, USA, 2005:2102-2111 [11] Magh arei N, Rejaie R , Guo Y, Mesh o r M u ltiple-Tree : A com para tiv e study of l ive P 2P stream i n g a pp roaches. P r oceed i ngs of Pr oce e d i ngs of IEEE INF OCOM'07, 6-12 M a y 2007, Ancho ra g e, AK, 2007:1424-1432 [12] D. Ciu llo, M. A. Garcia, A. Ho rvath , E. Leonardi, M. Me l lia, et al. Netw ork awaren ess of p2p l i ve strea m i ng applications . i n P roceedings of IPDP S 2009, Rome, I tal y , 25-29 Ma y 2009, pp . 1- 7 [13] Hei X, L iang C, L ia ng J, et al. A m eas uremen t study of a large sc a le P 2P IPTV sys t em, I EEE Tran sactions on Mu ltimedia, 2007, 9(8):1672-1687

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment