Dynamics of heterogeneous peer-to-peer networks



Similar documents
Recurrence. 1 Definitions and main statements

benefit is 2, paid if the policyholder dies within the year, and probability of death within the year is ).

What is Candidate Sampling

8.5 UNITARY AND HERMITIAN MATRICES. The conjugate transpose of a complex matrix A, denoted by A*, is given by

Luby s Alg. for Maximal Independent Sets using Pairwise Independence

How Sets of Coherent Probabilities May Serve as Models for Degrees of Incoherence

1. Fundamentals of probability theory 2. Emergence of communication traffic 3. Stochastic & Markovian Processes (SP & MP)

1 Example 1: Axis-aligned rectangles

v a 1 b 1 i, a 2 b 2 i,..., a n b n i.

BERNSTEIN POLYNOMIALS

Forecasting the Demand of Emergency Supplies: Based on the CBR Theory and BP Neural Network

Institute of Informatics, Faculty of Business and Management, Brno University of Technology,Czech Republic

Can Auto Liability Insurance Purchases Signal Risk Attitude?

An Alternative Way to Measure Private Equity Performance

DEFINING %COMPLETE IN MICROSOFT PROJECT

On the Optimal Control of a Cascade of Hydro-Electric Power Stations

A Lyapunov Optimization Approach to Repeated Stochastic Games

On the Interaction between Load Balancing and Speed Scaling

How To Calculate The Accountng Perod Of Nequalty

PSYCHOLOGICAL RESEARCH (PYC 304-C) Lecture 12

Support Vector Machines

Product-Form Stationary Distributions for Deficiency Zero Chemical Reaction Networks

When Network Effect Meets Congestion Effect: Leveraging Social Services for Wireless Services

Logistic Regression. Lecture 4: More classifiers and classes. Logistic regression. Adaboost. Optimization. Multiple class classification

Power-of-Two Policies for Single- Warehouse Multi-Retailer Inventory Systems with Order Frequency Discounts

The Development of Web Log Mining Based on Improve-K-Means Clustering Analysis

Causal, Explanatory Forecasting. Analysis. Regression Analysis. Simple Linear Regression. Which is Independent? Forecasting

INVESTIGATION OF VEHICULAR USERS FAIRNESS IN CDMA-HDR NETWORKS

An Interest-Oriented Network Evolution Mechanism for Online Communities

Loop Parallelization

This circuit than can be reduced to a planar circuit

On the Interaction between Load Balancing and Speed Scaling

THE DISTRIBUTION OF LOAN PORTFOLIO VALUE * Oldrich Alfons Vasicek

A Resource-trading Mechanism for Efficient Distribution of Large-volume Contents on Peer-to-Peer Networks

Section 5.4 Annuities, Present Value, and Amortization

Module 2 LOSSLESS IMAGE COMPRESSION SYSTEMS. Version 2 ECE IIT, Kharagpur

Forecasting the Direction and Strength of Stock Market Movement

"Research Note" APPLICATION OF CHARGE SIMULATION METHOD TO ELECTRIC FIELD CALCULATION IN THE POWER CABLES *

Linear Circuits Analysis. Superposition, Thevenin /Norton Equivalent circuits

PERRON FROBENIUS THEOREM

A frequency decomposition time domain model of broadband frequency-dependent absorption: Model II

Efficient Project Portfolio as a tool for Enterprise Risk Management

Schedulability Bound of Weighted Round Robin Schedulers for Hard Real-Time Systems

Answer: A). There is a flatter IS curve in the high MPC economy. Original LM LM after increase in M. IS curve for low MPC economy

Enabling P2P One-view Multi-party Video Conferencing

General Auction Mechanism for Search Advertising

An Evaluation of the Extended Logistic, Simple Logistic, and Gompertz Models for Forecasting Short Lifecycle Products and Services

Minimal Coding Network With Combinatorial Structure For Instantaneous Recovery From Edge Failures

A Secure Password-Authenticated Key Agreement Using Smart Cards

Section C2: BJT Structure and Operational Modes

AD-SHARE: AN ADVERTISING METHOD IN P2P SYSTEMS BASED ON REPUTATION MANAGEMENT

How To Solve An Onlne Control Polcy On A Vrtualzed Data Center


Optimal resource capacity management for stochastic networks

Project Networks With Mixed-Time Constraints

L10: Linear discriminants analysis

J. Parallel Distrib. Comput.

8 Algorithm for Binary Searching in Trees

ANALYZING THE RELATIONSHIPS BETWEEN QUALITY, TIME, AND COST IN PROJECT MANAGEMENT DECISION MAKING

Equlbra Exst and Trade S effcent proportionally

Fair and Efficient User-Network Association Algorithm for Multi-Technology Wireless Networks

2008/8. An integrated model for warehouse and inventory planning. Géraldine Strack and Yves Pochet

A Novel Methodology of Working Capital Management for Large. Public Constructions by Using Fuzzy S-curve Regression

The OC Curve of Attribute Acceptance Plans

Implied (risk neutral) probabilities, betting odds and prediction markets

FREQUENCY OF OCCURRENCE OF CERTAIN CHEMICAL CLASSES OF GSR FROM VARIOUS AMMUNITION TYPES

A Probabilistic Theory of Coherence

Stability, observer design and control of networks using Lyapunov methods

Traffic State Estimation in the Traffic Management Center of Berlin

STATISTICAL DATA ANALYSIS IN EXCEL

REGULAR MULTILINEAR OPERATORS ON C(K) SPACES

Chapter 4 ECONOMIC DISPATCH AND UNIT COMMITMENT

On the Approximation Error of Mean-Field Models

Trade Adjustment and Productivity in Large Crises. Online Appendix May Appendix A: Derivation of Equations for Productivity

How To Understand The Results Of The German Meris Cloud And Water Vapour Product

Section 5.3 Annuities, Future Value, and Sinking Funds

Calculation of Sampling Weights

IMPACT ANALYSIS OF A CELLULAR PHONE

Multi-Resource Fair Allocation in Heterogeneous Cloud Computing Systems

Joe Pimbley, unpublished, Yield Curve Calculations

IDENTIFICATION AND CORRECTION OF A COMMON ERROR IN GENERAL ANNUITY CALCULATIONS

CALL ADMISSION CONTROL IN WIRELESS MULTIMEDIA NETWORKS

Inter-Ing INTERDISCIPLINARITY IN ENGINEERING SCIENTIFIC INTERNATIONAL CONFERENCE, TG. MUREŞ ROMÂNIA, November 2007.

Pricing Model of Cloud Computing Service with Partial Multihoming

What should (public) health insurance cover?

Revenue Management for a Multiclass Single-Server Queue via a Fluid Model Analysis

Solution: Let i = 10% and d = 5%. By definition, the respective forces of interest on funds A and B are. i 1 + it. S A (t) = d (1 dt) 2 1. = d 1 dt.

Cloud-based Social Application Deployment using Local Processing and Global Distribution

Analysis of Energy-Conserving Access Protocols for Wireless Identification Networks

Joint Scheduling of Processing and Shuffle Phases in MapReduce Systems

Dominant Resource Fairness in Cloud Computing Systems with Heterogeneous Servers

A Parallel Architecture for Stateful Intrusion Detection in High Traffic Networks

Fixed income risk attribution

Transcription:

Dynamcs of heterogeneous peer-to-peer networks Fernando Pagann, Andrés Ferragut and Martín Zubeldía Unversdad ORT Uruguay Abstract Dynamc models of populaton n peer-to-peer fle sharng systems have focused on networks wth homogeneous access parameters, where peers receve a unform download rate. Ths paper studes networks wth heterogeneous upload bandwdths, for whch download allocatons are asymmetrc, resultng n a more complex mult-class dynamcs. We consder frst a model where a recprocty mechansm allocates download bandwdths n proporton to the upload speed, plus a unformly dstrbuted server component. For an ordnary dfferental equaton model of the mult-class peer populatons, we characterze the equlbrum and establsh ts global stablty, nvokng results from monotone systems. We also analyze a partal dfferental equaton model that tracks download progress of the populatons; we establsh the local asymptotc stablty of the equlbrum through a Lyapunov functonal. Fnally, we extend the ODE model to nclude a mx of proportonal and unform bandwdth allocaton, whch better descrbes the mechansms of BtTorrent systems; agan we characterze equlbrum confguratons and gve a partal result on local stablty. I. INTRODUCTION Peer-to-peer (P2P) fle-sharng networks have become a popular alternatve to dstrbute content over the Internet. They are based on the prncple that clents downloadng a fle can themselves contrbute ther upload bandwdth to serve others, thus achevng a valuable self-scalng property as supply of server bandwdth ncreases wth demand. One of the prevalng P2P systems s BtTorrent [2], whch ncorporates a recprocty ncentve: peers wll orent ther upload towards others from whom they have downloaded the most. Ths s desgned to avod free-rdng; for game theoretc studes of the nherent ncentves see [1], [1], [11]. P2P networks are nherently dynamc: the populaton of peers partcpatng n the sharng of a certan fle wll vary over tme, as peers arrve and leave the swarm. The speed of departures s determned by download rates, whch themselves depend on populatons; understandng ths feedback dynamcs has been a topc of actve research. A Markov queueng model was proposed n [2], and led subsequently to an ordnary dfferental equaton model [15], whch has been successful n estmatng equlbrum populatons, and establshng stablty [14]. These models are coarse n the sense that the state does not dscrmnate download progress of the swarm; n ths regard, n [6], [13] t s shown how that download quanttes can be tracked by a partal dfferental equaton model that leads to tghter dynamc predctons than the models of [15]. The above models are revewed n Secton II. Other references that attempt a fner trackng of fle peces are [9], [12], [22]. E-mal:pagann@ort.edu.uy. Ths analytcal work on P2P dynamcs focuses on the case of homogeneous peers,.e. wth common access bandwdth parameters. Here t s natural to assume that the real-tme download bandwdth s evenly dstrbuted, a processorsharng assumpton that smplfes mathematcs and shows good agreement wth smulatons of homogeneous BtTorrent systems. Far less s known for the stuaton, prevalent n practce, where the access parameters are heterogeneous: n ths case bandwdth allocaton can, and arguably should, be uneven: a recent reference for ths desgn space s [5]. As we dscuss n Secton III, proportonal recprocty where each peer receves as much as t gves s approxmately mplemented by BtTorrent tt-for-tat rules, however other aspects of the protocol ncorporate a processor-sharng component. The obect of ths paper s to analyze the populaton dynamcs of P2P swarms when heterogenety n access bandwdth and the resultng allocaton s present. In Secton IV we analyze the case of proportonal recprocty wth an ordnary dfferental equaton model; we characterze the unque equlbrum pont of the system and prove t s globally stable by means of results n monotone systems [8]. In Secton V we extend the model to a mult-class verson of the PDE n [13]; agan under proportonal recprocty, we descrbe the equlbrum and n ths case analyze the local aymptotc stablty through a Lyapunov argument n functonal space. In Secton VI we consder the stuaton where bandwdth s dstrbuted accordng to a mxed polcy: a fracton of proportonal allocaton combned wth a fracton of processor sharng. Usng an ODE model, agan we characterze the equlbrum and provde a partal result on ts local stablty. Conclusons are gven n Secton VII. II. BACKGROUND ON P2P DYNAMICS In a P2P system, content s dssemnated by subdvdng t nto small chunks, and enablng peers to exchange such unts bdrectonally. Thus every peer present s a server; those who are also clents are referred to as leechers, whereas seeders are those peers present n the system only to altrustcally dstrbute content. Populatons of both types of peers may vary dynamcally as arrvals and departures from the swarm take place, and also leechers may turn nto seeders upon termnaton of ther download, as has been consdered n many models [15], [2]. However a very common scenaro n practce s to have a few persstent seeders who act as overall servers for the content, and selfsh leechers who ust abandon the swarm upon termnaton. In ths paper we wll restrct our attenton to ths smplfed scenaro, that nevertheless captures the essence of p2p fle-sharng.

In ths secton we revew models for peer populaton n the homogeneous case, where all peers have upload bandwdth µ (n fles/second,.e. content s normalzed to unt sze), and assume a much larger download capacty that s never a bottleneck. A. Ordnary dfferental equaton model Followng [15], let x(t) denote the populaton of leechers n the system, taken to be a real varable, wth arrval rateλpeers/second. Lety be the fxed populaton of seeders. The total upload rate µ(y + x) n fles/second determnes the departure rate of leechers, so the populaton dynamcs s ẋ = λ µ(y +x). (1) In [7], the queueng-theoretc counterpart of the above dynamcs was analyzed: t nvolves a combnaton of the M/M/1 (fxed servce rate) and M/M/ (servce rate growng wth populaton) queues. Clearly, f λ < µy the traectores of (1) converge to zero n fnte tme, at whch pont the equaton must be proected for x to stay at the zero boundary. Ths, however, s not an nterestng case, snce servers y on ther own could satsfy the download demand wthout any p2p contrbuton. The more mportant case s λ > µy. Here traectores wll reman postve and converge to the equlbrum pont B. Partal dfferental equaton model x = λ µ y. (2) The dynamc model (1) contans lmted nformaton on the system state: the leecher populaton s counted by a sngle varable, wthout any detal on the progress n ther download 1. For a more precse descrpton one would lke to characterze downloaded content, wthout gong to the hghly complex detal of keepng track of specfc chunks. In prevous work [6], [7], [13] the authors have argued for an ntermedate resoluton model that tracks populatons as a functon of the fracton of downloaded content, treated as a contnuous varable. We now revew ths knd of model. Let σ [, 1] represent fracton of the content fle, assumed of unt sze. Defne the real-valued varable F(t, σ) that represents the populaton of leechers that at tme t, have pendng download of at least σ. Thus F(t,σ), nonncreasng n σ acts as the complementary cumulatve dstrbuton of the leecher populaton, wth F(t,) = x(t), the total leecher count and F(t,1) =. The dynamc model from [13] s: F t = λ+r F, σ [,1]. (3) Here λ s agan the arrval rate, and affects the entre dstrbuton, assumng leechers arrve wth no pror content. r represents the download rate per peer: t regulates the speed at whch the functon F(t,σ) s transported n the drecton 1 Ths can be seen as a feature nherted from the correspondng M/Mqueue models, whch gnore resdual workloads of the queue due to the memoryless property of the assumed exponental dstrbuton. of σ =. In our scenaro of fxed seeders, the smplest expresson for the rate s whch assumes: r = µ(x+y ), (4) x Effcency,.e. the entre upload bandwdth µ(x+y ) s avalable for download. A processor sharng dscplne: the upload bandwdth s unformly dstrbuted among leechers. Emprcal evdence ndcates that ths s qute an accurate model for BtTorrent systems under the homogenety assumpton (see [7], [13], whch also cover varants such as transent behavor, response to nose and seeder varablty). The equlbrum of (3) under (4) s a unform dstrbuton of download, F (σ) = x (1 σ), where x s gven by (2). So both ODE and PDE models concde n ther predcton of the equlbrum populaton; when t comes to dynamcs, however, t s shown n [7], [13] that the fner state descrpton of the PDE model provdes far more accurate predctons. III. RESOURCE ALLOCATION IN HETEROGENEOUS P2P SWARMS Consder now the stuaton where peers partcpatng n the swarm have a heterogeneous access to the network, specfed by a set of possble upload rates {µ } n =1. Assume there are x leechers at each of the classes, and gnorng momentarly the seeder contrbuton, the queston we ask s how to allocate the total upload capacty µ x among the leecher populaton. The above ssue can be rased as a desgn queston (whch allocaton should there be?) or as a descrptve queston about current P2P systems (e.g. BtTorrent). A recent reference that explores the frst queston s [5]: n t, the authors show there s a tradeoff between optmzng performance (mnmzng mean download tme) and farness, understandng the latter to mean party between how much peers gve to, and receve from, the network. Intermedate allocatons are also explored. An mportant ssue s whether an allocaton admts a decentralzed mplementaton,.e. a set of mutual exchange rules peers can follow to acheve t, wthout the nterventon of a central authorty. In ths secton we revew a proportonal recprocty scheme that can acheve the (proportonally) far allocaton descrbed above, assumng a fne control of mutual rates. We then compare t wth the result of the more practcal mechansms of BtTorrent. A. Proportonal recprocty Consder n ths secton a fxed, fnte set of n leechers, wth upload bandwdths {µ } n =1, possbly wth repettons. Let k be a dscrete-tme ndex that represents an exchange slot, and let z (k) denote the bandwdth devoted by peer to peer n the k-th slot. Assumng effcency we have z (k) =, z (k) = µ.

The total download rate of peer from all leechers s r (k) = z (k). In matrx terms: f Z (k) s the n n matrx wth components, t has zero dagonal and satsfes the relatonshps z (k) Z (k) 1 = µ, [Z (k) ] T 1 = r (k) ; here 1, µ, and r are column vectors wth components 1, µ, and r (k) respectvely, and T denotes transpose. Based on receved rates, peers must select ther allocaton for the followng slot; a natural rule consdered n [1], [19], [21] s proportonal recprocty: gve to others n proporton to what s receved from them. Mathematcally z (k+1) = µ. z(k) r (k) or Z (k) = dag(µ /r (k) )[Z (k+1) ] T. Ths means to transpose the matrx and renormalze rows to have sum µ. Equvalently, one could frst renormalze the columns to have sum µ T, and then take transpose. In ths sense, except for the tranpose operaton, ths teraton amounts to an teratve row and column renormalzaton of a non-negatve matrx, a topc that was studed classcally by Snkhorn [17], who establshed condtons for convergence. Ths connecton was found n [19]. In partcular, provded the equatons Z1 = µ,, 1 T Z = µ T are ontly feasble wth a matrx Z of the prescrbed structure, row and column renormalzaton wll converge. If one only mposes a zero dagonal structure, feasblty wll hold provded no sngle µ s greater than the sum of the rest. Ths s a mld restrcton f the peer populaton s large. Under these crcumstances, the odd and even subsequences of Z (k) (k) k converge, and the rates r µ. The concluson s that proportonal recprocty allocates each peer, asymptotcally, a download equal to ts upload. In the homogeneous case ths mples a processor-sharng model, but n the heterogeneous case servce becomes dfferentated n proporton to contrbutons to the swarm. B. BtTorrent s tt-for-tat and optmstc unchoke The above rule, whle elegant, s not easly mplemented n practce: t requres mantanng open connectons wth all other peers, and regulatng ther rate n a dfferentated fashon, somethng not smple to mplement wth Internet TCP connectons. The alternatve mplemented by BtTorrent s a rankng scheme: classfy peers accordng to bandwdth receved from them n a recent perod, and then unchoke (allow a transfer to) those peers whch occupy the hghest places. It turns out that such scheme also closely approxmates a proportonal allocaton, snce peers wth ths rule tend to form clques wth others of smlar upload bandwdth (for a theoretcal ustfcaton of ths fact see [5], Thm 2.). In addton to the above tt-for-tat rule, BtTorrent ntroduces an optmstc unchoke to another peer at random: ths Average throughput (Kbps) 15 1 5 1 5 Uploadng peers 5 Downloadng peers Fg. 1. Average throughput of connectons between peers wth 8 smultaneous connectons, 7 accordng to rankng and 1 optmstc. s done to explore the set of peers. Ths porton of the upload bandwdth s then dstrbuted n an egaltaran fashon n the swarm. The result s therefore a combnaton of proportonal and processor sharng allocatons. To llustrate and support the above clams, we smulate n Matlab the tt-for-tat and optmstc unchoke teraton for a set of 1 leechers (5 at µ 1 =512Kbps and 5 at µ 2 =256Kbps). In each teraton, every peer performs the rankng accordng to bandwdth receved (we add some nose to make these measurements more realstc) and unchokes those n hghest rank. A pseudorandom choce of optmstc unchoke s performed every three steps. After a long tme we record the average throughput that peers gve each other,.e. the matrx of average z s: results are depcted n Fgure 1. It can be seen that peers gve most of ther bandwdth to others of the same speed (proportonal allocaton), but also gve a small amount to the other class due to the optmstc unchoke (processor sharng allocaton). IV. ORDINARY DIFFERENTIAL EQUATION MODEL UNDER PROPORTIONAL RECIPROCITY In ths secton we begn our theoretcal analyss of a heterogeneous p2p network. We consder a swarm of p2p leechers downloadng a common content fle, classfed n n groups accordng to ther upload bandwdths {µ }. Proportonal recprocty s assumed, so each peer receves from other leechers a servce rate equal to ts own upload rate. As ust explaned, ths model s consstent wth the ttfor-tat porton of the BtTorrent exchange mechansm. A generalzaton that covers the egaltaran porton nherent n the optmstc unchoke wll be dscussed n Secton VI. We wll also assume there s a fxed set of seeders y = y, each of whch has upload bandwdth µ 2. Let x denote the flud populaton of leechers n class, of upload bandwdth µ. An ordnary dfferental equaton model for the populaton dynamcs s: ẋ = λ [ 1 µ y n =1 x +µ ]x. (5) 2 Heterogeneous seeders could be ncluded wth essentally no change, ths s avoded for smplcty.

Here λ > s the arrval rate of leechers of class. We are assumng that the leecher sharng porton of the download satsfes proportonal recprocty, and thus the download rate per peer s equal to the class upload bandwdth; however the seeder porton of the download s equally dstrbuted among all the peer populaton. Ths model parallels (1) for the sngle-class case; note however that we now have a more complex, nonlnear ODE. Remark 1: Snce the state represents populatons, the above equaton apples only to the postve orthant R n +. In regard to the boundary: f a nonzero x has one coordnate x =, the correspondng rght-hand sde of (5) s λ >, hence the flow moves back to x >. Equvalently, an ntal condton x () > wll never reach one of these boundary faces of the orthant. The only degenerate pont (where our equaton s not well defned) s x = : we wll make an assumpton below that mples that ths pont s never reached from postve ntal condtons. Assumpton 1: λ > µ y. Ths means that the seeders alone cannot cope wth the servce demands. We now establsh the exstence and unqueness of an equlbrum pont of the dynamcs under ths condton. Proposton 1: Under Assumpton 1, the dynamcs (5) has a unque equlbrum x = (x ) wth x > for each. Proof: Frst note that addng (5) over gves ẋ = λ µ y µ x ; ths rules out the possblty that x tends to zero for every, snce before ths happens the sum x would begn to ncrease through Assumpton 1. So traectores wll reman n the nteror of the orthant. We look for equlbrum ponts x n ths regon. A frst necessary condton follows from the precedng equaton: λ µ y = µ x. (6) To obtan further necessary equlbrum condtons mpose whch mples that = ẋ x ẋ x = λ x λ x (µ µ )x x, λ x µ = λ x µ,; (7) we denote the above quantty by α. Note that α x = (λ µ x ) = µ y, therefore α represents the equlbrum fracton of seeder bandwdth avalable per leecher, common to all classes: α = µ y x Solvng now (7) gves >. (8) x = λ µ +α, (9) whch can be substtuted n (6) to express the necessary condton for equlbrum as a sngle equaton n α: α λ µ +α = µ y. (1) Denote the left-hand sde of (1) as g(α). Note that t s strctly ncreasng n α, g() =, g(+ ) = λ > µ y. Therefore there exsts a unque root α > to (1). Substtutng n (9), there s a unque pont x > that satsfes the condtons for equlbrum. It s straghtforward to show conversely that satsfyng (9-1) s suffcent to have an equlbrum of (5). We wll now establsh the global stablty of ths equlbrum pont. The key observaton s that we are n the realm of monotone dynamcal systems [8], because the vector feld n (5) (let us denote t by h(x)) satsfes the cooperatve condton h x for. (11) Equvalently, the Jacoban matrx h x s Metzler, wth nonnegatve off-dagonal elements. Flows satsfyng ths property are monotonc, n the sense of preservng vector nequaltes, whch greatly narrows down the possbltes for the dynamcs. For lnear dynamcs, the Metzler property also has strong mplcatons that smplfy varous analytcal questons (see [16]). We now state the man result of ths secton. Theorem 2: Under the condtons of Proposton 1, the equlbrum s globally asymptotcally stable. Proof: We begn by verfyng condton (11). Indeed we have for ( [ ] ) µ y λ x l x +µ x = µ y x l ( l x l) 2. It follows from [8] (Theorems 3.5 and 3.2) that the correspondng flow s monotone: for two ntal condtons satsfyng the vector nequalty x() ˆx(), the correspondng solutons satsfy x(t) ˆx(t) t. Furthermore, a strong monotoncty holds n the nteror of the orthant. We now establsh that the n-dmensonal open nterval X = {x R n + : < x < λ /µ for each } s postvely nvarant under the flow. Indeed, assume x() X; we already know traectores reman strctly postve. For t to reach the boundary of X at some tme t would requre some component to satsfy x = λ /µ and ẋ. But at such x the dynamcs (5) gves ẋ = µ y l x x <, l a contradcton. On the other hand, assume the ntal condton s outsde X. Frst we clam the state remans bounded. In fact: coordnates (f any) satsfyng x () < λ /µ wll reman wthn ths bound as before, whle those : x λ /µ wll have ẋ. We can thus wrte the bound µ y x ǫ for some ǫ >.

But then any coordnate wth x λ /µ satsfes ẋ ǫx, and therefore the set X s reached n fnte tme. We can thus restrct our attenton to the dynamcs on the bounded open nterval X. We have a strctly monotone flow wth orbts of compact closure, wth a sngle equlbrum pont n X. Corollary 1.2 n [8] mples there s global convergence to equlbrum. V. MULTI-CLASS PDE MODEL In ths secton we wll work wth the partal dfferental equaton model revewed n Secton II-B that keeps track of download progress n addton to populaton, and extend t to cover the mult-class stuaton. Specfcally, we consder a content fle of unt sze, and the contnuous varable σ representng fle fracton: let F (t,σ) be the flud populaton of leechers of class that have at tme t a pendng download of at least σ. The total class populaton s F (t,) = x. The correspondng PDE model takes the form F t = λ + ( ) µ y n =1 x +µ } {{ } r (F,y ) F, σ [,1]. (12) The equlbrum analyss from the prevous secton extends readly to ths case. Note from (12) that at equlbrum, F must be constant n σ, so we have the unform dstrbuton F (σ) = x (1 σ), where x satsfes the same equlbrum condtons of the ODE case. Under Assumpton 1 we have a unque equlbrum pont, characterzed by (9-1). Let us consder now the stablty of ths equlbrum of the PDE. At the tme of wrtng we have not pursued a study of the global dynamcs, nor a fully rgorous treatment of the functon spaces nvolved n the PDE. Our analyss s lmted to lnearzng the PDE around equlbrum, and establshng that the resultng lnear system s stable n both nput-output (transfer functon) terms, and nternally through a Lyapunov functonal. We wll assume enough smoothness of solutons to allow second order dervatves and for dfferentaton under the ntegral sgn to go through. We use x, r to denote ncremental scalar varables, and lowercase notaton for the functon-valued ncremental varable f (t,σ) = F (t,σ) F (σ); we have f (t,1) and f (t,) = x. The lnearzaton s f t = f r x r (13) where the ncremental rate s r = µ y ( x = α x, x )2 x wth α from (8). The second term n (13) s now expressed as x r = r κ x, where κ := α r x x. (14) Note r = α+µ > α, so κ < 1. (15) Let us further denote u := κ x. (16) It wll also be convenent to defne τ = (r ) 1 = x λ (equlbrum download tme per peer). It follows that the lnearzed dynamcs s the feedback nterconnecton of: A set of parallel blocks G, wth nput u and output x, characterzed by the nfnte-dmensonal dynamcs f t (t,σ) = 1 f τ (t,σ)+ 1 u (t), (17a) τ x (t) = f (t,), (17b) f (t,1). (17c) The statc mappng (16), represented n matrx form by u = K11 T x, (18) where K s the dagonal matrx dag(κ ). In [7] the sngle-class counterpart of the above dynamcs was analyzed. It was shown that the block (17) has transfer functon Ĝ (s) = 1 e τs, τ s and n partcular satsfes Ĝ(s) = sup Ĝ(ω) = 1. ω R In the present case, the loop transfer functon K11 T dag(g (s)) s rank one, so ts nput-output stablty s equvalent to that of the scalar loop gan It follows that L(s) = 1 T dag(g (s))k1 = L(ω) κ Ĝ(ω) κ Ĝ (s). κ < 1, whch mples nput-output stablty from a small-gan argument (e.g. [3]). We now tackle the nternal stablty queston, establshng frst that each of the nfnte dmensonal systems n (17) admts a storage functonal, ntroduced as follows. For the local state f (t,σ) of (17) defne: [ ] 2 f V (f ) = τ σ dσ. (19) Proposton 3: Under the dynamcs (17), [ ] 2 V = u 2 f dσ (2) u 2 x2. (21) Proof: To smplfy notaton we omt here the subndex n the varables f,u, x, and use f t, f σ n leu of f t, f

respectvely. We also ntroduce second order dervatves f tσ, f σσ, and so on. Dfferentatng (17a) agan n σ gves f σt = 1 τ f σσ; (22) also evaluatng (17a) n σ = 1 yelds from (17c) f σ (t,1) = u(t). (23) Dfferentatng V (f) n (19) along the dynamcs we have the followng: V = τ = 2σf σ f tσ dσ σ (f σ) 2 dσ = [ σ(f σ ) 2] 1 (f σ ) 2 dσ = u 2 (f σ ) 2 dσ. Here the frst step uses (22), the second s ntegraton by parts, the thrd uses (23). So we have (2). Now apply the Jensen nequalty to wrte [ 2 (f σ ) 2 dσ f σ dσ] = [f(t,1) f(t,)] 2 = x 2, (24) whch establshes (21). We now state the man result of ths secton, pertanng to the stablty of the feedback dynamcs of (17) and (18). Theorem 4: The dynamcs (17-18) s asymptotcally stable n the sense of L 2 [,1]; n partcular f (t,σ) 2 t for each. Proof: We frst establsh that for {κ } satsfyng (15), the nequalty u 2 (1 δ) x 2 (25) holds for small enough δ >, under (18). Frst express the left-hand sde of (25) n matrx form as u T K 1 u = x T 11 T K11 T x = ( κ ) x T 11 T x. Now, through two Schur complement operatons we can establsh the equvalence between the nequaltes: ( κ )11 T < K 1 (26) [ ] K 1 1 1 T ( κ ) 1 <, ( κ ) 1 +( κ ) <. The last follows from (15). So (26) holds, and wll also hold when modfed by a slght scalng (1 δ) on the rghthand sde. Ths leads to (25) as clamed. Defne now the global Lyapunov functonal V(f) = V (f ). Note that from the nequaltes (21) and (25) t follows mmedately that V u 2 x 2, so stablty n the wde sense follows. To obtan the asymptotc result requres a slghtly tghter argument that s now presented. Use (2) and (25) to obtan V = u 2 [ [ ] 2 f dσ [ ] 2 x 2 (1 δ) f dσ] [ ] 2 f ( δ) dσ; here the last step uses (24). Now supermpose ǫv to obtan V +ǫv [ δ +ǫτ σ] [ ] 2 f dσ. Choosng small enough ǫ >, we can ensure the ntegrand s non-postve for all σ, and thus V +ǫv. Ths leads to the Gronwall bound In partcular for each, V(t) V()e ǫt σ [ ] 2 f dσ t. t. The proof wll conclude from the bounds f 2 2 4 [ ] 2 1 [ ] 2 σ 2 f f dσ 4 σ dσ, (27) the frst of whch s a Poncaré-type nequalty establshed as follows. Start from ntegraton by parts, ] 1 f 2 2 = f 2 dσ = [ σf 2 2 } {{ } = 2 f 2 σ f 2 1 2 f 2 2 +2 σ f 2. 2 σf f dσ whch uses Cauchy-Schwarz and the bound 2ab γ 1 a 2 + γb 2, for γ = 2. Ths establshes (27) (note σ 2 σ).

VI. GENERALIZED ODE MODEL: INCLUDING A PROCESSOR SHARING COMPONENT As dscussed n Secton III-B, BtTorrent systems mplement a mxture of tt-for-tat recprocty, whch approxmates a proportonal allocaton due to the formaton of clques, and optmstc unchoke, whch provdes an egaltaran fle sharng. In ths secton we generalze our dynamc model to characterze such mxed behavor, and obtan partal results on equlbrum ponts and ther stablty; we wll do ths only n the smpler settng of ODE models. Our modfed dynamcs s now presented: ẋ = λ [ µ y +θ n =1 µ x n =1 x +(1 θ)µ ] } {{ } r x (28) Here the parameter θ (, 1) controls the fracton of upload bandwdth that all peers devote to the egaltaran flesharng. e.g. θ = 1/4 n a typcal BtTorrent mplementaton. Thus peers of class wll contrbute a bandwdth θµ x to the common upload pool, whch together wth the seeder bandwdth µ y wll be unformly dstrbuted n the leecher swarm, hence the frst term of the rate per peer r above. The second term above results from a recprocty scheme, nvolvng the fracton (1 θ) of the bandwdth. Assumng proportonalty as before each leecher wll receve from here a bandwdth equal to ts contrbuton. A model for rates wth ths structure was consdered n [5]. We now study the correspondng dynamcs. Proposton 5: Under Assumpton 1, the dynamcs (28) has a unque equlbrum x = (x ) wth x > for each. Proof: We generalze the proof of Proposton 1. Aggregatng (28) over gves agan ẋ = λ µ y µ x, therefore we can once agan rule out the possblty of traectores gong to zero, and any equlbrum must satsfy (6): λ = µ y + µ x. We further mpose = ẋ x ẋ x = λ x λ x (1 θ)(µ µ )x x, whch mples now that λ x (1 θ)µ = λ x (1 θ)µ,; (29) agan we denote ths quantty by α. Multplyng by x and addng leads to so α x = (λ (1 θ)µ x ) = µ y +θ α = µ y +θ µ x x µ x, >. (3) α now represents the equlbrum download bandwdth each leecher receves from the egaltaran porton of the upload. Now (9) generalzes to x = λ (1 θ)µ +α, (31) and further operatons lead to the necessary condton λ µ x = λ (α θµ ) = µ y. (32) α+(1 θ)µ } {{ } g(α) The modfed functon g(α) s stll strctly ncreasng, g(+ ) > µ y, and now wth g() <. So there s stll a sngle soluton to (32), whch results through (31) n a sngle equlbrum pont x >. We now tackle the queston of stablty of the equlbrum. Unfortunately, the addtonal term n the dynamcs does not preserve the monotone systems property whch was crucal for our earler global stablty argument. We wll hence lmt ourselves to a local stablty analyss, and gve a partal result, mposng a suffcent condton on the equlbrum that guarantees local stablty. Theorem 6: Consder the equlbrum x of the system (28) under the condtons of Proposton 5. Suppose that α n (3) satsfes θµ 2α for each. (33) Then the equlbrum s locally asymptotcally stable. Before proceedng we provde an nterpretaton for condton (33). The left-hand sde s the amount of upload bandwdth that a leecher of class contrbutes to the swarm n an egaltaran (non-recprocal) way; α represents the download porton every peer receves from the egaltaran upload. The nequalty means that no peer s contrbutng n equlbrum, more than twce of what t receves; so there s a bound on the level of mbalance n ths non-recprocal component of the fle-sharng. Proof: We lnearze the dynamcs around equlbrum. The ncremental rate r now becomes r = θ µ x x = (θµ α) x, x (µ y +θ µ x ) x ( x )2 where we have nvoked (3). The lnearzed dynamcs s x = r x x r = r x + x α x (1 θµ α ) x. (34) Settng D = dag(r x ), v the vector of components α x and w the vector of components 1 θµ α, we can wrte the lnearzed dynamcs as x = A x wth A = D+vw T.

1 8 6 4 2 Fast peers Slow peers 1 2 3 4 5 6 7 8 Tme (hours) Fg. 2. Two-class experment. Peer populatons for smulated BtTorrent, PDE model (sold) and ODE model (dashed). Note that A would be a Metzler matrx f the components of w were non-negatve, whch happens when θµ α. Our hypothess (33) s however weaker than ths, all we can clam s that w 1 for all. Stll, ths enables a dagonal domnance argument. For fxed wrte a + n a r + v w =1 r + n =1 x α x = r +α <, (n fact r = α + µ (1 θ)). Invokng for nstance the Gershgorn Crcle Theorem [18] appled to the columns of A, we fnd that ts egenvalues must le n crcles of center a, radus a, contaned n the open left half-plane. Therefore A s a Hurwtz matrx. A. Expermental llustraton To llustrate and valdate our analyss we report a packetlevel smulaton of the BtTorrent algorthm, carred out n the network smulator ns2 wth the BtTorrent lbrary [4]. There are y = 2 seeders, µ = 5.3 1 4 fles/sec, accountng for overhead neffcences, (the fle sze s 1MB, a fle s uploaded n 31 mn). Leechers of two classes arrve wth λ 1 = λ 2 = 1.5 peers/mn, wth µ 1 = µ,µ 2 = 1 2 µ. The optmstc unchoke fracton s set to 1/8. Fgure 2 shows the results of an 8-hour run, wth an empty ntal condton. For comparson we nclude the traces of the model (28) (dashed) and also a verson of the PDE model (12) modfed to nclude the rates n (28). Both models show convergence to an equlbrum roughly consstent wth the expermental populatons, wth the PDE verson gvng tghter transent predctons. VII. CONCLUSIONS In ths paper we analyzed the dynamcs of P2P networks under heterogenety n access bandwdth. We developed mult-class models that dscrmnate peer populatons accordng to ths parameter, and studed the effect of recprocty schemes that provde asymmetrc download speeds to these classes. For proportonal schemes where download speeds from other leechers equal the upload rate, we provde a complete analyss of the equlbrum and ts global stablty n the case of ODE populaton models, and a local stablty analyss for the fner PDE models that track download advance. We also provde partal results for the ODE case when a mxture of proportonal and egaltaran fle sharng s present. In future work we wll seek to complete the analyss of ths mxed case, and pursue global questons for the case of PDE models. REFERENCES [1] C. Apers, R. Johar, and M. J. Freedman, Blateral and Multlateral Exchanges for Peer-Asssted Content Dstrbuton, IEEE/ACM Trans. on Networkng, vol. 19, no. 5, pp. 129 133, 211. [2] B. Cohen, Incentves buld robustness n BtTorrent, n Proc. of 1st Workshop on the Economcs of Peer-2-Peer Systems, Berkeley, CA, 23. [3] R. Curtan and H. Zwart, An Introducton to Infnte-Dmensonal Lnear Systems Theory. NY: Sprnger-Verlag, 1995. [4] K. Eger, T. Hossfeld, A. Bnzenhofer, and G. Kunzmann, Effcent smulaton of large scale p2p networks: packet-level vs. flow-level smulatons, n Proc. of UPGRADE-CN 7, Monterey Bay, USA, 27. [5] B. Fan, J. C. Lu, and D.-M. Chu, The Desgn Trade-Offs of BtTorrent-Lke Fle Sharng Protocols, IEEE/ACM Trans. on Networkng, vol. 17, no. 2, pp. 365 376, 29. [6] A. Ferragut, F. Kozynsk, and F. Pagann, Dynamcs of content propagaton n BtTorrent-lke P2P fle exchange systems, n Proc. of 5th IEEE Conference on Decson and Control (CDC 211), Orlando, FL, 211. [7] A. Ferragut and F. Pagann, Content dynamcs n P2P networks from queueng and flud perspectves, n Proc. of 24th Internatonal Teletraffc Congress, Krakow, Poland, 212. [8] M. Hrsch and H.L.Smth, Monotone dynamcal systems, n Handbook of Dfferental Equatons: Ordnary Dfferental Equatons, P. D. A. Cañada and A. Fonda, Eds. Elsever, 26, vol. 2, pp. 239 357. [9] G. Kesds, T. Konstantopoulos, and P. Sous, Modelng fle-sharng wth BtTorrent-lke ncentves, n Proc. of IEEE Int. Conf. on Acoustcs, Speech and Sgnal Processng, Honolulu, HI, 27. [1] D. Levn, K. LaCurts, N. Sprng, and B. Bhattacharee, BtTorrent s an Aucton: Analyzng and Improvng BtTorrent s Incentves, ACM SIGCOMM Computer Communcaton Revew, vol. 38, pp. 243 254, 28. [11] R. T. Ma, S. C. Lee, J. C. Lu, and D. K. Yau, Incentve and Servce Dfferentaton n P2P Networks: A Game Theoretc Approach, IEEE/ACM Transactons on Networkng, vol. 14, no. 5, pp. 978 991, 26. [12] L. Massoulé and M. Vonovć, Coupon replcaton systems, IEEE/ ACM Transactons on Networkng, vol. 16, no. 3, pp. 63 616, 28. [13] F. Pagann and A. Ferragut, PDE models for populaton and resdual work appled to peer-to-peer networks, n Proc. of 46th Annual Conference on Informaton Scences and Systems, 212. [14] D. Qu and W. Sang, Global stablty of Peer-to-Peer fle sharng systems, Computer Communcatons, vol. 31, no. 2, pp. 212 219, 28. [15] D. Qu and R. Srkant, Modelng and performance analyss of BtTorrent-lke peer-to-peer networks, ACM SIGCOMM Computer Communcaton Revew, vol. 34, no. 4, pp. 367 378, 24. [16] A. Rantzer, Dstrbuted control of postve systems, 212. [Onlne]. Avalable: http://arxv.org/abs/123.47 [17] R. Snkhorn, Dagonal Equvalence to Matrces wth Prescrbed Row and Column Sums. II, Proc. of Amercan Mathematcal Socety, vol. 45, no. 2, pp. 195 198, 1974. [18] R. S. Varga, Matrx teratve analyss. NY: Sprnger-Verlag, 2. [19] F. Wu and L. Zhang, Proportonal response dynamcs leads to market equlbrum, n Proc. of the 39th Annual ACM Symposum on Theory of Computng, San Dego, CA, 27. [2] X. Yang and G. De Vecana, Servce capacty of peer-to-peer networks, n Proc. of IEEE Infocom, Hong Kong, 24. [21], Farness, ncentves and performance n peer-to-peer networks, Performance Evaluaton, vol. 63, no. 3, pp. 175 194, 26. [22] J. Zhu and B. Haek, Stablty of a peer-to-peer communcaton system, IEEE Trans. on Informaton Theory, vol. 58, no. 7, pp. 4693 4713, 212.