Presentation is loading. Please wait.

Presentation is loading. Please wait.

BitTyrant.

Similar presentations


Presentation on theme: "BitTyrant."— Presentation transcript:

1 BitTyrant

2 Premise Despite the incentive system of BitTorrent, there is a lot of altruism in the network High capacity peers provide upload bandwidth without reciprocation Object: create client with higher download rate at expense of other peers

3 Steady state A steady state is when peers don’t change their unchoked peers A peer is content if all its unchoked peers upload at least as much as it does How long does it take to be content? Assume optimistic unchoking every 30 seconds of 2 peers in the reference implementation

4 Time until being content

5 Probability of Reciprocation
A peer Alice receives data from Bob if either of: Alice and Bob are in a tit-for-tat relationship (this is reciprocation) Bob optimistically unchokes Alice As Alice’s upload rate grows, the probability of reciprocation grows A low capacity peer – may always have to look for new peers A high capacity peer May not need to upload beyond a certain limit

6 Probability of Reciprocation (cont.)

7 Altruism Let u is called altruism and is defined by:
u - upload bandwidth of peer d – download bandwidth of peer u is called altruism and is defined by: u = max {; given upload of u-u, the download is c}

8 Expected altruism

9 Strategies to Improve Download
Find peers that give high download bandwidth for low upload rate For example, altruistic high bandwidth peers Increase active set (all unchoked peers) to maximize utility Each additional unchoked peer gives potential source for download bandwidth Each additional unchoked peer reduces bandwidth to other peers, increasing the probability of another peer choking the current peer What is the point of maximum benefit? Non-equal split of bandwidth Alice gives Bob only as much bandwidth as necessary for Bob to maintain her unchoked status

10 Optimal Active Set Size
300 KBPS upload (others distributed as in slide On upload distributions)

11 Optimal Active Set Size (cont.)
Optimal active set size as function of upload bandwidth

12 BitTyrant Algorithm Let dp and up be the download and upload rates of peer p. Every 10 seconds Order all peers by rank of up/dp Unchoke the first k peers such that idi  upload limit Update up and dp: If peer p does not unchoke us then dp(1+)dp If peer p unchokes us upobserved rate If peer unchokes us for r rounds then dp(1-)dp

13 Measurement Based in part on Measurement, Modeling, and Analysis
of a Peer-to-Peer File-Sharing Workload Krishna P. Gummadi, Richard J. Dunn, Stefan Saroiu, Steven D. Gribble, Henry M. Levy, and John Zahorjan

14 Why measure? Understanding network behavior is essential for optimization Optimization of service provider resources Optimization of peer strategies Network behavior is complex and depends on Physical limits of resources Human requirements and behavior Interaction of many factors P2P file sharing networks often work differently than e.g. the Web Example: download once vs. download many times Always on server vs. dynamic peer entry into and exit from a network

15 How to measure Model Measure real world traffic Simulate
Simplify “real world” and optimize solutions Advantage: clear answers can sometimes be found and “proven” Disadvantage: usually only approximation of real world and often doesn’t take all factors into account Measure real world traffic Advantage: this is the real thing Disadvantage: measure only part of network for given time so may not capture “whole” truth; More difficult to analyze and draw conclusions Simulate

16 What to measure User Service provider Other Link utilization
Best strategy to pick peers for upload/download Best strategy to pick pieces to download Service provider Network utilization Piece capacity (number of pieces in the network) Distribution of pieces in network Efficiency of network (ratio of effective throughput to optimal throughput) Other File lifetime User behavior: e.g. altruism

17 Distribution of File Size (Kazaa 2002)

18 Distribution of File Size (cont.)

19 Measuring CDN Peers “push” content to other peers
Results similar to file sharing networks Results affected by Peer selection Piece selection Study in next slides conducted by simulation Assumptions Peers have global knowledge of other peers and the pieces they have Peers choose which peers to serve (upload to)

20 More assumptions Simultaneous arrival – all peers begin download at once from one seed Homogeneous and symmetric bandwidth – u1=d1=…=un=dn, where n is the number of nodes, ui the upload bandwidth of node i and di the download bandwidth of node i. Peer first applies peer selection and then piece selection Active connections: Five for upload Five for download Selfish peers – leave the network after download

21 Peer Selection Strategies
Random – a peer is selected at random Least missing – peer missing fewest pieces to complete file Shortest Remaining Processing Time (SRTP) in scheduling Most missing – the opposite Evenly spread pieces – all peers can support distribution Random least missing – select random value in [0,(#missing pieces)2] and rank from lowest Random most missing – select random value in [0,(#received pieces)2] and rank from lowest

22 Random Piece – Completion Time

23 Comments Least missing Most missing – most effective strategy Random
Essentially server-client in batches of five But, first peer finishes before every other strategy Most missing – most effective strategy Every peer can help other peers Random Begins effectively Effectiveness is reduced as many peers are close to completion –random piece selection means that some pieces are rare

24 Example Assume that peers use first random peer selection and then random piece selection strategy Sending peer doesn’t send anything if receiving peer has chosen piece Assume that each piece appears twice in the network except for one peer that appears once Assume that each peer holds three pieces Claim – if piece p appears twice then after one time slot, the expected number of appearances in network is 2+2/3-2/(n-1). If appears only once then expected number is 1+1/3

25 Peer Selection – Network Efficiency
From Self-scaling Networks for Content Distribution Pascal A. Felber, Ernst W. Biersack Institut EURECOM, Sophia Antipolis, France

26 Comments Most missing fairly efficient almost to the end
Least missing is inefficient but loses little until the end Random strategy becomes less effective with time

27 Rarest Piece – Completion Time
A significant improvement to random and least missing strategies. The problem that is solved here is that rare pieces disappear from the network as soon as a peer leaves. Thus, the original seeder has to serve these pieces again and again, creating a bottleneck

28 Comments The difference is that
Piece selection is not random but rarest first Random peer selection becomes as good as most missing Least missing is dramatically improved

29 Continuous Arrival New peers arrive to download file every time unit
Constant rate Poisson distribution [f(n,)=(ne-)/n! is the probability that if the expected arrival rate is  then there are exactly n arrivals in a time unit]

30 Continuous Arrivals

31 Piece Capacity of the System
This continues the previous slide, showing the number of pieces in the network. Note that peers exit the network after downloading the whole file. Thus, when a number of peers

32 Download of 3rd Lord of the Rings (2003-4)
Flash Crowd measurements of BitTorrent in A Measurement Study of the BitTorrent Peer-to-Peer File-Sharing System J.A. Pouwelse, P. Garbacki, D.H.J. Epema, H.J. Sips Download of 3rd Lord of the Rings (2003-4)

33 Model for Evolution in BitTorrent
Based on D. Qiu and R. Srikant. Modeling and performance analysis of bittorrentlike peer-to-peer networks. In Proc. ACM SIGCOMM’04, Portland, Oregon, USA, Aug. 30–Sept

34 Assumptions Global knowledge by each peer on whole swarm
Upload/download constraints only in access network Bandwidth identical for each peer File of size 1

35 Notation 1 x(t) – number of downloading peers at time t
y(t) – number of seed peers at time t  - upload bandwidth of each peer c – download bandwidth of each peer, c  - “Effectiveness” parameter, a value in the range [0,1] that determines the effectiveness of download from non-seeds When c is very large, the total upload rate of the network is (x(t)+y(t)) In general the upload rate is min{cx(t), (x(t)+y(t))} Drate= min{cx(t), (x(t)+y(t))}

36 Downloader to Seed rate
A downloader receives Drate/x(t) data at each time unit A downloader completes the download in x(t)/Drate time We assume that a downloader completes download at steady rate, i.e. has probability inter*Drate/x(t) to complete download in time interval of length “inter” Probability that there exists a downloader that becomes a seed in interval inter is Inter*Drate Rate of downloaders becoming seeds is: Drate

37 Notation 2  - arrival rate of new peers, Poisson distribution
Reasonable in short term Changes overtime due to effect of flash crowd -> indifference  - rate at which downloaders abort download Rate of downloaders leaving the network is now Drate+ x(t)  - rate at which seeds leave the network, geometric distribution with mean 1/

38 Evolution of Peer Number
Rate of change for downloaders dx/dt= -Drate-x(t) dy/dt=Drate-y(t) What is the steady state (number of downloads and seeds stays the same)? A steady state means dx/dt=0 dy/dt=0

39 Steady state (I) Assume that >0
Denote the steady state values by x’ for x(t) and y’ for y(t) If the total download is a bottleneck in Drate, i.e. cx’  (x’+y’)* then x’= /[c(1+/c)] y’= /[(1+/c)] And (by setting y’/x’=c/ in *) 1/c1/(1/-1/) cx’(x’+y’) c  (+y’/x’) c  (+ c/) c(- )   1/c 1/(1/ -1/)

40 Steady state (II) If the total upload is a bottleneck in Drate, i.e. cx’  (x’+y’) then x’= /[c(1+/)] y’= /[(1+/)] Where = (-) From cx’  (x’+y’) we have 1/c1/(1/-1/)=1/ Thus, if 1/=max{1/c, 1/), we have x’= /[(1+/)] y’= /[(1+/)] (1) 0=-(x’+y’)-x’ (2) 0= (x’+y’)-y’ => x’=(-)y’=> y’= [/(-)]x’ (3) Adding (1) and (2) we obtain 0= - x’- y’ =>y’=(- x’)/  (4) From (3) and (4) [/(-)]x’= (- x’)/ [/(-)+ /]x’= / [/+ /]x’= / x’= /(+ ) x’= / (1+ /) (5) Since (3) states that y’= / x’ We have from (3) and (5) that x’= /(1+ /) (6)

41 Little’s Law Queue Theory Assume a queue
Customers enter the queue Wait Leave after they are served L – average number of customers in system  - average arrival rate T – average waiting time Little’s law L= T

42 Average Download Time in Steady State
According to Little’s law x’= T Thus T=1/(+) Conclusions Recall that 1/=max{1/c, 1/(1/-1/)} If the upload is the bottleneck then as  increases, T decreases If the upload is the bottleneck then as  increases, T increases (fewer seeds in the system) Increasing c beyond the bottleneck does not improve the download time If  then the download is the bottleneck regardless of how large the download bandwidth is (in this case it makes sense to increase the download)

43 No downloader-to-downloader traffic
Assume =0 Downloaders receive data only from seeds If , the previous analysis is correct (download is the bottleneck) If > then: Recall dy/dt=Drate-y(t)=(x(t)+y(t))-y(t) Thus, dy/dt= y(t)[-] y decreases towards 0 Decrease is exponential If =0 and > then swarm will die out (quickly) If >0 swarm will reach a steady state (but the assumptions are not true forever!)


Download ppt "BitTyrant."

Similar presentations


Ads by Google