Random Walks in Peer-to-Peer Networks


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Random Walks in Peer-to-Peer Networks

  1. 1. 1 Random Walks in Peer-to-Peer Networks Christos Gkantsidis, Milena Mihail, and Amin Saberi College of Computing Georgia Institute of Technology   Atlanta, GA Email: gantsich, mihail, saberi @cc.gatech.edu ¡ Abstract— We quantify the effectiveness of random of the search space (in flooding, increasing the TTL by walks for searching and construction of unstructured 1 may increase the space coverage exponentially). peer-to-peer (P2P) networks. For searching, we argue (b) [2] give a distributed algorithm for constructing that random walks achieve improvement over flooding and maintaining unstructured topologies with very strong in the case of clustered overlay topologies and in the connectivity properties, namely constant degree and con- case of re-issuing the same request several times. For construction, we argue that an expander can be maintained stant expansion, with ¨§¦¥¤¢ © £ overhead per addition of dynamically with constant operations per addition. The a peer, where is the number of peers. At a very high key technical ingredient of our approach is a deep result level, when a new peer arrives, their protocol simulates of stochastic processes indicating that samples taken from a random walk on the existing overlay topology which, consecutive steps of a random walk can achieve statistical after§¦¥¤¢ © £ steps, reaches a nearly uniformly random properties similar to independent sampling (if the second existing peer to which the new peer attaches. eigenvalue of the transition matrix is bounded away from What are the analytic reasons of the success of the 1, which translates to good expansion of the network; random walk method? Can we isolate one or two com- such connectivity is desired, and believed to hold, in every prehensible analytic primitives that explain the power reasonable network and network model). This property has been previously used in complexity theory for construction of the method? Most important, can we translate these of pseudorandom number generators. We reveal another primitives to heuristics, or rules of thumb, for the use of facet of this theory and translate savings in random bits the method in P2P network applications? to savings in processing overhead. Independent sampling from the uniform distribution is Keywords: Graph theory, Combinatorics, Statistics, a primodal statistical, and hence algorithmic primitive. peer-to-peer networks. However, it is infeasible in many complex populations, such the set of nodes of a P2P network, since this set is not maintained anywhere and it is also quite I. I NTRODUCTION dynamic. In this paper we make the following argument: The simulation of a random walk, or more generally a In every case where uniform sampling from the set Markov chain, is a fundamental algorithmic paradigm of nodes of a P2P network would have been a good with highly sophisticated and profound impact in al- algorithmic approach, the random walk method is an gorithms and complexity theory. Furthermore, it has excellent candidate (i) to simulate uniform sampling, found a remarkably wide range of applications in such moreover, (ii) the number of simulation steps required diverse fields as statistics, physics, artificial intelligence can be as low as the number of samples in independent (Bayesian inference), vision, population dynamics, epi- uniform sampling, which translates to constant network demiology, bioinformatics, among others. overhead, independent of the size of the network. Recently, random walks have been proposed as pri- In particular, beyond adaptivity to termination condi- mary algorithmic ingredients in protocols addressing tions and granularity in space coverage discussed in [1], searching and topology maintenance of unstructured P2P we believe that the power of the random walk method networks. In particular: can be pinned down into two kinds of analytic properties: (a) Following extensive experimentation, [1] report The first analytic property, corresponding to (i), is that searching by simulating random walks has supe- that for any population whose members can be con- rior performance as compared to the standard approach nected by links forming a connected graph, performing of searching by flooding. They attribute the improved a random walk which started at any state and using performance of random walks to their adaptivity in the state of the random walk at time , as a sample termination conditions and hence granularity in coverage point, simulates sampling with arbitrary accuracy, for
  2. 2. 2 bounded by well defined parameters of the graph. This is arrives, they look for a few nearly uniformly random rather intuitive, since we expect that graphs without any existing peers to connect the new peer by simulating “bad” or “bottleneck” cuts will make the walk to “loose steps of a random walk of the set of existing ¨§¦¥¤¢ © £ memory” and hence reach a random state quite fast. In peers. This causes network overhead per newly §¦¥¢ © £ particular, for a wide range of applications, it is possible arriving peer. We introduce a daemon construction to to construct sparse graphs so that §¦¥¤¢ © £ . Such simulate the second analytic property and connect a fast convergence rates translate to practically efficient newly arriving peer with constant network overhead. In simulation of uniform sampling. fact, there are strong dependencies between the edges The second analytic property, related to (ii), is sub- of peers that arrive closely in time. We give analytic stantially more profound and rather counter-intuitive. evidence that these local dependencies do not affect the It states that starting the random walk at a random global connectivity properties of the network, up to con- state, simulating the walk for steps, and using each ! stant factors. We also give strong experimental evidence visited node as a sample point, we may achieve same that our daemon construction simulates the algorithm statistical properties as independent uniform samples. ! of [2] (and other related constructions) (a)with overhead The reason why this is counter-intuitive is because of the a very small constant per arriving peer, (b)for networks obvious huge dependencies between successive steps of up to 5M nodes (which is the current believed size of a random walk, of which have been used in the place ! Kazaa; larger experiments were stressing the memory of independent uniform sampling. limits of our machines), and (c)with truly negligible In this paper we focus on two central issues of P2P penalty in the quality of the connectivity of the overall networks, namely searching and overlay topology con- topology. struction. For both problems we have isolated scenaria We believe that our results in the context of P2P where independent uniform sampling would have been a network construction are particularly surprising. From good algorithmic primitive. We then simulate indepen- ! a practical point of view, they indicate that minimal dent samples with successive (up to constant factors) ! amount of (correctly used) randomization suffices to states visited during the simulation of a random walk on keep a dynamic network well connected. From a theoret- the P2P network. Finally, we compare the performance ical point of view, we believe that they lead to an exciting of sampling by random walk to the performance of new problem and paradigm in the study of the power the standard, or previously known techniques in each and necessity of randomness. All of our algorithms in application. Our results and conclusions are: the context of construction were inspired by the second (a) For searching relatively popular items, (when analytic property of random walks. uniform sampling is obviously beneficial) we found, The isolation of the second property has been one experimentally, that searching by random walks performs of the most celebrated results in complexity theory [3], better than flooding (for the same number of network [4], [5], [6]. In complexity theory this property has been messages) in two cases: (i) When peers in the topology used as follows. Consider a randomized algorithm that form clusters (representing, for example, thematic parti- uses random bits and has probability of success 1/2. tioning), so that the whole topology is arranged in 2 tiers, By simulating the algorithm times we may decrease ! the lower representing peer clustering and the higher the failure probability to . This needs )'%# ($ random 0! connecting representatives from each cluster (e.g. super- bits. Now think of the nodes of a graph labeled by all nodes) to ensure good global connectivity. (ii) When -bit strings that be used to simulate a randomized 32 1 the same search request is re-issued repeatedly, in hopes algorithm. Consider a constant degree “expander” graph of finding new peers, while the entire topology has not 4 imposed on these nodes (there are known deter- 1 changed dramatically (less than 40%). We believe that ministic constructions of such “expander” graphs). Start both scenaria are realistic. However, to the best of our a random walk from a uniformly random point of and 4 knowledge, they have not been considered in previous simulate a random walk on 4 for steps. This requires ! studies. £ random bits to pick the initial point, and 5¤¢ 76!¤¢ £ We believe that our results in the context of searching bits to perform the walk. Then simulate the randomized are intuitive. Our primary contribution was to formalize algorithm on the -bit strings visited by the random 8! setups of practical interest and translate our analytic walk. The failure probability is , and yet we used ( '%9¤¢ $#£ intuition in these setups. only random bits to perform the experiment! 7BA5¤¢ ! @ £ (b)For constructing and maintaining a P2P topology This observation is the basis of some of some of the with good connectivity properties, we turned to the strongest known pseudorandom number generators with approach of [2]. As mentioned before, when a new peer provably good performance. In some sense, our work
  3. 3. 3 can be also viewed as translating a complexity result, conductance express the worst-case “cuts” of the graph, mostly known in the context of savings in random bits, and it is natural to expect that when the graph does not into savings in overhead and improved performance in a have “bad cuts” a random walks approaches its stationary practical networking context. distribution very fast, and hence sampling by random The balance of the paper is as follows: In Sec- walk “mimics” well independent sampling. tion II, we give the supporting theory, comparing coupon collection and Chernoff bounds to the corresponding A. Coupon Collection and Chernoff Bounds statements in random walks. All the technical parts of this section are known; their synthesis and relevance in The coupon collection problem is the following: Suppose the context of networking is new. In Section III, we that there are distinct types of coupons. At each step, use random walks to perform searching in P2P networks we draw a coupon whose type is uniformly distributed among all types. Let be the time by which we have and compare this approach to searching using flooding 1D encountered coupons belonging to all distinct types. It and uniform sampling. Note that flooding corresponds to breath first search, whose statistics are not as well is well known [7] that quantified as those of random walks. In Section IV, cb§a5`RY@XXW@ UT @ SR PI H1 D E V © ¥ £ ¢ V V V Q # Q @ # G F (1) we describe two algorithms for distributed construction of P2P topologies with good expansion properties. We Let be a constant, 3¤Age # f d f . Let dbe the time by stress that our experiments in Sections III and IV are on 1 iD h which we have encountered coupons belonging to pd the size of current P2P networks. Many implementational distinct types. It is also well known that and other details are suppressed to emphasize clearly the new ideas and for lack of space. We conclude in 35¤¢ u# w# vi uA t@XXs@ SA rI H1 qD E V £ d Q # @ d Q VVV # Q @# G h F Section V. (2) We proceed with an outline of Chernoff bounds[8]. Let II. S TATISTICAL E STIMATION AND R ANDOM WALKS Fx „ † … ƒ XXV ‚€x x VV y be independent Bernoulli trials with In this section we focus on the statistical properties ”S’# ‘ 8¤e x ‰iˆ G v ˜x b†¨—… „ ( U G # !  “  # ‡  ‡ Q E # e † ¤ yFx and F † , , ‡x . of sampling performed (a)by ideal independent draws, Let P™ G ‡! , hence ( – • . In a searching and (b)by simulating a random walk. In the case of context, where denotes the probability that a randomly ‡ independent sampling we are interested in the number of drawn object has a desired property, we are interested in samples sufficient to achieve a certain statistical property. the probability that the property is found in substantially In the case of random walks we are interested in the fewer draws than its frequency in the search space. This number of simulation steps sufficient to achieve the same corresponds to the event P9ew29c x , for ‡!d Q#£ . For T7fe # fd f statistical property. this event, Chernoff bounds are For comparison, we consider two common abstrac- tions, namely the coupon collection problem and Cher- … Fx b„ V ¦mnl'” G P9ehg9‘ k ji ‡!d Q #£ (3) noff bounds for independent Bernoulli trials; these ab- In a measurement context, where denotes the frac- ‡ stractions refer to sampling by independent draws. For tion of objects satisfying a certain property, we are sampling by random walk simulation, we consider the !'$ x interested in the quality of the estimator for . Now, ‡ cover time which is the suitable analogy to coupon for , Chernoff bounds are: qpo¤7fe Ve fd f collection, and the trajectory sample average which is x n the suitable analogy to independent Bernoulli trials. ! Cra…b„ s V 6m5wl n j B¤76‡B0t€Q k i  v d us ‡ (4) We observe that, for both abstractions, the overhead of the random walk simulation method is determined only by the second eigenvalue of the probability transition B. Random Walks, Convergence, Cover Time and Tra- matrix of the random walk. In particular, when the jectory Sample Average second eigenvalue is constant (independent of the size of Let C†y ˜x £ be an undirected connected graph, zE ¦€{ys s the graph) the random walk method achieves the same . Let | denote the degree of vertex , 3i“3w # “ )Š‰†  Œ . Let statistical characteristics as independent sampling, up to ‚¨¤€q{f)|  € ~} . Let ˜ ‹ ˜q# … %„ €‡ , … †† | ƒ57ƒy , be the †ƒ C¤¢ £ notation. adjacency matrix of . Let “ ˆ  be the transition matrix x „ 71 The reason why the second eigenvalue provides such of the random walk on , where a particle that is on x clean characterizations is that it is intimately related vertex at time , moves to a neighbor of at time “ #ƒŽ @ “ , Ž to global connectivity properties of the graph, namely chosen uniformly at random among all neighbors of : It “ expansion and conductance. Intuitively, expansion and is well known and easy to verify that the above random
  4. 4. 4 ‘ walk has a unique stationary distribution , in the sense Compare (6) to (1) and realize that, for constant , ¬ —§ that ‘  ‘ , with E 7'“’A —{f} ‘ –‰•# s E 7'$ † ” † ‘ , “  s | , and let they both solve coupon collection in the same order of s s '{f)| ~ $ ~} . magnitude. … #  e œQ ™ ˜ y Let be a 0-1 function on , . Let Let be the time by which the random walk visits ˜ „ ›š y 1 g¿ h distinct vertices of , for some constant , . be the probability mass of vertices that take the value ‡ id x Thfe d #  d  ‘ 1 under under the stationary distribution , which is ˜ It is straightforward to derive from [12], [13] (and is the same as the mean of under : ‘ ˜ folklore among probabilists) that y y V ž ‘ o5¥f˜ 'X¤ ž ‘ —  £   Ÿ ž y ež fXž €‡ £ ¡  Ÿ (5)  r1 g¿ sE G h F h y j yy y Á ²9£o$ ~ ‘ §ˆ% ¬œ§U7§¾²{9fj } 5À S¢¢ Q # ¢ 'š hj e 1 £aAq{f} V à ~ ‘ … ƒ‚¬ Q # o$ £ £ Of particular interest are the following three met- (7) rics: (a)Convergence rate, which is the rate with which Compare (7) to (2) and realize that, for constant , they ¬—§ the random walk approaches the stationary distribution. both solve partial coupon collection in the same order of (b)Cover time, which is the time when the random walk magnitude. has visited all vertices at least once. This is analogous to Recall that denotes the vertex that the random walk ±° the coupon collection abstraction, and we wish to have visits at time . Let . Suppose that we simulate C5°fTPµÄ ± £ ˜ ± Ž bounds comparable to (1) and (2). (c)Trajectory sample the random walk for y ‘ y ‘ average, which is the rate with which the value of , ˜ {y fj } ©¨§¥ u {fj } §¥ ~ ~ © averaged over successive vertices of a trajectory of the (8) random walk, approaches . This is analogous to the ‡ j¬ w§¥ ¬ U²# § © § Q Chernoff bound abstraction, and we wish to have bounds steps (very roughly, this guarantees good approach to comparable to (4). In the next paragraph we point out to stationarity according to the bound on and then Ž ´ bounds for all the above metrics in terms of the second use the next ! steps as sample points. We thus let eigenvalue of .  ± Ä y ‚(Æ Å ‚—Æ ±8• –Ä . The particularly strong result is that, Å using as an estimator for , is of the same quality '¨Ä !$ ‡ C. Bounds in terms of the Second Eigenvalue as Chernoff bounds which refer to totally independent samples. Thus, despite the local dependencies introduced In general, a vector ¦ is an eigenvector of with ‘ by consecutive steps of the random walk, the overall eigenvalue if and only if ¨’’  ¦ §¦§ . Thus, is an distribution of the vertices visited by the random walk is eigenvector of with eigenvalue 1. It is well known  well spread across the sample space. In particular, (9) that has real eigenvectors with corresponding eigen- values # aQ u 1 §®u˜VXXV­uB¬œ§ V «©y ª ©#  § [9], [10]; below is to be compared to (4): the strict separation of the first and second eigenvalues 9n P¦ËÊÉtw†nÈ n n Í Ì follows from the connectivity of . The first eigenvalue x 6ml k j B G 6‡B0t€Q ! Ä s F „ iÇ d us‡ … V (9) ‘ « r¯{§s # 3 y § which corresponds to eigenvector characterizes The above result was obtained (in increasingly stronger stationarity. We may also assume that s 1 {§s s ¬ (large forms and referring to pseudorandom number simula- negative eigenvalues concern strong periodicities, like tion) in a sequence of celebrated complexity theory bipartiteness, which we may exclude for the purposes papers [3], [4], [5], [6]. The version that we give above of this paper). is from [6]. Consider a random walk on according to the x transition matrix , starting from an arbitrary vertex,  or an arbitrary distribution on . Let y be the vertex ± r° D. Second Eigenvalue, Expansion and Conductance that the random walk visits at time , . To ³`²Ž”h# Ž For , define the cutset of , y v½ Î , as the set of ½ ¤¿ ½ £ bound the convergence rate of the random walk we focus edges with one endpoint in and the other endpoint is Ï ½ on the so-called variation distance which, at time , is Ž ½. Define the volume of as the sum of the degrees of ½ X ½ £ ˆQ G ± ¾¼± ° ‘ F b†s   gg2¶µƒ5Ž£ ´ s  ‘ ½ »y … „ º ´ ¹ ¸ · € . The following is vertices in : . The expansion and the ž | ¹ ‚ž • ½ Œ)Ð ½ Ÿ £¥ § known [11]: . ¬ § {fj } gƒ5Ž£ ~  conductance of are: x Let be the time by which the above random walk Ñ visits all the vertices of . [12], [13] show: x y 1 ¿ V Xs ½ ½ Œ££ ¤{¿§ s Ð ¨‚¤€ ÓI X s ½ {¿s s £ ¨‚¤€  ¥ ) y ©½Ò s½ y ©½ Ò y Á†‚ œU²9o§¥ {fj } ‘ •¢  r1 ¿ E ¬ § Q #£ $ © ~ À G F ¨ ½ Œ)§Ð £¥ '{$€{y•0s s½ s s  V e 1 £aÃAq{f} ‘ §  ƒ‚7¾²9o§a5B¢ ~ … ¬ § Q #£ $ © ¥ £ 'ƒCÔ¥)Ð $ y£ § (6) (10)
  5. 5. 5 In addition, the following bound is known [11]: On the other hand, for the same number of messages, ¬ Ó the random walk follows totally different trajectories and V ²`‰œ” Ó uÕ# Q #  ¬§ Q (11) has better chances to discover new sources. Note that in previous work, searching has been always modeled as Finally, realize that in graphs where we have bounds on an one time process. However, we believe that studying the minimum and maximum degrees, both expansion, searching under multiple requests and a changing topol- conductance and eigenvalues are easily related. In par- ogy is realistic and important. ticular, in regular graphs, if any of these metrics is a The motivation behind studying peer clustering be- constant then all of them are constants. comes clear if we consider the process by which the In summary, for families of graphs where ¬ ¯§is P2P network is formed. Each peer keeps a cache of other constant, consecutive states of random walks are ex- peers and picks its neighbors from its cache. The cache cellent candidates to approximate independent uniform is populated by the addresses of peers that answered sampling. Since, ¬ œ§ constant is equivalent to expansion Ñ previous queries [20]. Thus, intuitively, the cache con- constant, and constant expansion is equivalent to good tains addresses of peers that have similar interests. It is global connectivity, it is reasonable to try the random therefore reasonable to expect that this process leads to walk approach in communication networks. Good global the formation of communities of users. The exact process connectivity is desired and believed to hold in all rea- by which P2P networks are formed is largely unknown sonable networks and network models [14], [15], [16], and thus peer clustering is at this point only a hypothesis. [17], [18], [19]. But, we believe that it is a fair hypothesis based both on our practical experience with P2P systems, and on the III. S EARCHING observation that most networks grown in a decentralized In this section we study the performance of searching way exhibit strong clustering properties. See also [21], using flooding and random walks, and compare the two [22], [23], [24] and for related discussion [25]. methods to each other and to a baseline case of indepen- The rest of the section is organized as follows. First, dent uniform sampling. We measure the performance in we give the methodology. Then, we discuss the most terms of the average number of distinct copies of an simple case of a topology without clustering that does not item located in the search, the probability of not finding change with time. In this scenario, we find that flooding any copy of the item, even though there are copies and random walk behave similarly. Next, we examine in the network, and the number of messages that the topologies with peer clustering. Next, we examine multi- searching algorithm uses. We show experimentally that ple re-issues of a request in topologies that change slowly random walk is better than flooding, if at least one of with time. In the last part we discuss power-law graphs the following conditions holds: and real topologies. Random walks behave better than ÖThe user issues multiple search requests for the flooding in most cases of interest. same item and between two consecutive requests the topology changes relatively slowly (in the sense that two consecutive snapshots of the topology are A. Methodology highly correlated). In all our experiments we assume that copies of the item ÖThere is peer clustering. That is, there are com- to be discovered populate × of the peers, where td d munities in the topology, with dense connectivity is a parameter with %¨#oخؐ %gŠeoe × Ve  d ×# V . Assuming between peers in the same community and sparse that a single search reaches 10000 distinct nodes, a connectivity between peers of different communi- typical value of the horizon of a user in the Gnutella ties. network [20], the search will result, in expectation, in We believe that the two scenarios introduced above 1 to 10 distinct copies found for the range of ’s wed are important for the following reasons: have experimented with (this represents items that are not In practice, when a user issues a request, the user (or, rare). The performance of each searching technique is the system on behalf of the user) re-issues the same measured as the number of distinct copies located when request multiple times hoping to locate more sources. simulating the searching algorithm from a randomly Consecutive floodings take advantage of the changes in chosen peer of the topology. To make statistically robust the topology that happen in between and can discover conclusions, we repeat the experiment from a set of more sources. If the topology however remains mostly randomly chosen peers, typically 500 peers, and study unchanged between consecutive request, then the new the distribution of the number of distinct copies located floodings will mostly discover sources already known. (hits).
  6. 6. 6 a) Performance Metrics: A metric that summarizes since the topology evolves during the topology the distribution of the hits is the mean. Of equal impor- discovery process, some peers are uncooperative tance, however, is the discrepancy around the mean, and and for other practical reasons. Because of their failure probability (probability of no copies discovered). very limited size, our results are inconclusive. Even when the means of random walks and flooding d) Dynamic Topologies: The dynamic nature of the are the same, it is almost always the case that the P2P topologies is a crucial parameter of these systems discrepancy and failure probability of random walk is [29]. However, very few things are known about the way substantially better than flooding (e.g. see Figure 2). these topologies evolve over time. To model the dynamic We therefore measure Mean, standard deviation Std, and nature of the P2P topologies we have used the following Failure probability. heuristic: We perform a number of “rewirings”; for each b) Cost: We measure the cost of each searching rewiring we pick two edges uniformly at random and technique as the number of messages or queries per- exchange their end points. The number of rewirings is formed during the search. When comparing different a parameter that is related to the speed by which the algorithms, it is always under the assumption of using topology is changing. In our experiments the measure- the same number of messages. ments are happening before and after the rewirings and c) Peer-to-peer topologies: Available topologies of not during the process of changing the topology. The size current P2P networks are limited in size and of ques- of the topology remains unchanged during the changes, tionable quality due to the collection method (topologies since we want to capture only effects of changes in from [26] have only 30-40K nodes, when current P2P the connectivity of the topology and not the effects of networks have hundreds of thousands and perhaps mil- changes in the number of peers. lions of users). We have therefore experimented on syn- In our experiments we measure the speed by which thetic topologies of up to 1 million nodes. Experimenting the topology is changing as the ratio of the number of with extremal synthetic topologies has the additional links changed by performing rewirings over the total advantage of facilitating the demonstration of general number of links. We have experimented with ratios in principles. the range from 2% to 40%. The rate of change in current We have used the following models to generate syn- P2P networks is not known and is difficult to estimate. thetic P2P topologies: However, from our practical experience, we observe that Ö Flat regular expanders. This is a canonical example consecutive searches that happen every 10-20min do not of regular graphs with good expansion properties. result in differences in hosts discovered that would have We use expanders since expansion is desired and been expected if a large fraction of the network has believed to hold in every reasonable network and changed. network model [17], [2], [18]. We have used 6- e) Content placement: The straightforward ap- regular expanders. proach is to pick the nodes that will host the copies Ö Two-tier topologies with clustering. To study the uniformly at random from the entire population. This is effects of peer clustering we have started by con- what we have used in our experiments. We have also structing a number of isolated regular expanders that experimented with cases where the nodes that host the correspond to the clusters. Then, from each cluster item are close to each other in the topology (content we pick a small number of nodes at random and clustering). In our experiments, we have observed that connect them using another regular expander. content clustering affects the performance of searching Ö Power-law graphs. Many important networks that by flooding or random walk much less than peer cluster- arise in a decentralized fashion are known to have ing, or re-issuing of the same request. We therefore do power-laws [15], [23], [27]. Some researches argue not present this case. that P2P topologies may also possess heavy tails [28]. We have used the standard model of growth with preferential connectivity to generate power-law B. Flat Topologies with Uniformly Distributed Content random graphs (this model runs in linear time and We start by examining a scenario in which the per- hence can efficiently generate graphs of very large formance of flooding and random walks is similar. See size). Table I. We study the performance of issuing a request Ö Samples of real topologies. We have used partial only once in a flat regular topology of 500K peers. After views of the Gnutella topology made available in simulating the flooding algorithm with a time to live [26]. These topologies are limited in the number of (TTL) of 5 and counting the number of messages, we run peers (around 35K) and of questionable accuracy, the random walk algorithm and configured it to use the
  7. 7. 7 TABLE I 12 P ERFORMANCE OF SEARCHING IN A STATIC TOPOLOGY WITHOUT Flooding Random Walk 10 Uniform PEER CLUSTERING . 8 Attribute Flooding RW Uniform # of hits Mean 8.712 8.796 10.990 6 Std 3.01 2.93 3.22 Min 1 2 3 4 Messages 22331 22331 22331 Unique peers 17235 17431 21839 2 Note: 500K peers, . Min is the minimum number of hits àÞÛ ‚T’Ù ßÝ ÜÛ Ú 0 over all searching requests. Unique peers is the number of distinct 0 100 200 300 400 500 peers discovered during the search. Observe that flooding and RW have very similar performance, while uniform sampling is better. Fig. 2. Sorted number of hits in a topology with peer clustering. The distribution of random walk is more concentrated around the mean. 18 Flooding Topology of 200K peers, . eÞÛ %A’Ù ßÝ ÜÛ Ú 16 Random Walk Uniform 14 12 is constructed as follows. We generate five flat regular graphs each with size 40K. From each topology we # of hits 10 8 pick 1000 nodes at random (for a total of 5K nodes) 6 and construct another flat regular graph on the selected 4 nodes. The final P2P network is the composition of all 2 topologies. 0 0 100 200 300 400 500 The performance of each searching algorithm run on the example topology for different content popularities is given in Table II. First, observe that the average number Fig. 1. Sorted number of hits when searching from 500 randomly chosen peers. Topology of 500K peers, . Observe that ààÛ %”8Ù ßÝ ÜÛ Ú of hits using flooding was slightly better than using flooding and random walk have very similar performance. random walks, but, given the large standard deviations, the differences are not statistically significant. Even though the two schemes behave similarly with respect same number of messages. Observe that the mean and to the average number of hits, they have totally different minimum numbers of hits, and the standard deviation behavior when it comes to the failure rate and the of the hits distribution of both flooding and random minimum number of copies found. For %, gŠeoâ®d # Ve walk are roughly the same, while independent uniform flooding failed in 28.8% of the cases and random walk sampling is better. Moreover the entire distribution of in only 10.8%, an improvement of nearly a factor of 2. hits, given in Figure 1, is similar for both random walk The fundamental difference between the two searching and flooding. algorithms is that the number of hits in the case of We have experimented with topologies of various sizes random walks appear more concentrated around the and for various popularities of files, with ¾”á%gŠeoe  d  ×# V mean (observe also the entire distribution of hits in %¨#oe × V , and found that always the performance of flooding Figure 2). Indeed, the standard deviation in the case of and random walk are similar, when both are allowed to random walks is much smaller compared to the standard use the same number of messages. deviation of flooding. Obviously, the optimal concentra- Observe that compared to the study of [1] we use tion around the mean is achieved by uniform sampling. only one walker. The results were similar when using a The basic strength of random walks, following Section II larger number of walkers assuming that the total number is precisely that they resemble uniform sampling in a of messages stays the same. The use of more walkers quantifiable way. increases the user-perceived delay, which is a parameter we do not study in this paper. D. Re-issuing the Same Query In this section, we study the performance of flooding C. Topologies with Peer Clustering and random walks in flat regular topologies under the as- We now examine a topology with well separated sumption that users issue the same query multiple times communities of peers and show that random walk has while the topology is changing. Realize that dynamic better performance than flooding. The example topology topologies favors only flooding, while random walks will
  8. 8. 8 TABLE II P ERFORMANCE OF SEARCHING IN A TOPOLOGY WITH PEER CLUSTERING . Method Mean tè†å †gtã ç æå ä Std Min Failure Mean 6èCå †gtã é æå ä Std Min Failure Mean Cêåç †gfã è æå ä Std Min Failure Flooding 1.754 1.91 0 28.8% 9.308 6.44 1 0.0% 18.192 11.04 5 0.0% RW 2.124 1.38 0 10.8% 10.860 3.21 2 0.0% 21.764 4.54 10 0.0% Uniform 2.676 1.52 0 6.6% 13.496 3.26 5 0.0% 27.274 4.87 15 0.0% Note: Topology of five clusters for a total of 200K peers. ¦íC6ìì †gä n ë é æå . TABLE IV be largely unaffected. In fact, in the worst case where P ERFORMANCE OF SEARCHING IN DYNAMIC TOPOLOGIES AS A the topology is not changing, re-issuing a flooding query FUNCTION OF THE RATE OF CHANGES . ! times does not find new copies. On the other hand, according to (7) and (9), increasing the length of the Links Flooding Random Walk random walk by factor has substantial impact. ! Changed Mean Std Failure Mean Std Failure 2% 0.488 0.67 60.6% 1.398 1.14 24.6% 4% 0.644 0.82 53.0% 1.382 1.11 23.6% The performance of the different algorithms for 10% 0.888 0.86 38.0% 1.450 1.11 21.4% topologies of various sizes and for various values of 20% 1.162 0.99 27.6% 1.456 1.12 20.8% d is given in Table III. Our experimental methodology 40% 1.460 1.12 20.0% 1.378 1.13 23.8% is as follows: Each peer initiates a searching request and waits for the results. Then, we change the topology by performing rewiring operations to 2% of the links. Then, each peer initiates a new searching request and E. Real topologies and topologies with power-law statis- this process continues 4 times. In the end, we count the tics number of distinct items found for each peer. In the previous analysis we have experimented on Table III indicates that random walks have better flat regular graphs. Similar results hold for topologies performance compared to flooding with respect to both with heavy-tailed statistics as well as in real topologies. the average number of hits and the probability of failure. In Figure 3, we show the distribution of hits for a The average number of hits for random walks was at topology of 500K nodes generated with the model of least three times better compared to the same num- growth with preferential connectivity [30], and for a real ber for flooding. Also, the failure probability dropped Gnutella topology taken from [26]. Again, observe that substantially. This great performance improvement was the distribution of hits in the case of random walk is more expected since, even though we change a certain number concentrated around the mean compared to flooding. of links, the overall topology remains relatively stable Indeed, in the real topology, the mean number of hits, and successive flooding searches do not result in many the standard deviation and the failure rate were 0.514, new items found. On the other hand, prolonging the 2.15 and 81% respectively in the case of flooding in the random walk, or, successive random walks from the same real topology, and 0.538, 0.73 and 59% in the case of peer, follow totally different sampling paths and have random walk. Similar results apply for the graph grown better chances of locating new copies of the requested with preferential connectivity. item. Observe that the very small TTL used for flooding in the case of the real topology was due to the small The performance of successive searches depends on size of the topology. Increasing the TTL to 3, would the number of topology changes that take place between have resulted in reaching almost half of the nodes with the consecutive searches. We have studied this effect flooding and would have skewed the statistics. It is more and report the results in Table IV. We observe that the realistic to expect that searching visits only a small performance of flooding increases as the rate of topo- portion of the graph. logical changes increases. For very fast rates of change In conclusion, we expect that our results apply to ( r)î ×e at each step in our experiment), the performance of all graphs with good expansion property as expected flooding becomes comparable to that of random walks, from the theoretical section. In addition, we expect since effectively the neighborhood of each node changes that typical networks, like P2P networks, have good almost completely between consecutive searches. On the expansion properties, otherwise, they would have not other hand, the performance of random walk remains scaled easily from a few tens of thousands to a few relatively unaffected by the changes in the topology. million nodes.
  9. 9. 9 TABLE III P ERFORMANCE OF SEARCHING IN DYNAMIC TOPOLOGIES . A. Flooding Size (K) tè†å †gtã ç æå ä 6èCå †¨tã é æå ä Cêåç †gtã è æå ä në Mean Std Min Failure Mean Std Min Failure Mean Std Min Failure 100 0.488 0.67 0 60.6% 2.294 1.45 0 8.6% 4.566 2.08 0 1.4% 0.79 300 0.412 0.64 0 66.2% 2.350 1.57 0 9.4% 4.918 2.26 0 0.4% 0.79 500 0.550 0.75 0 58.6% 2.562 1.68 0 8.8% 4.992 2.27 0 0.6% 0.79 1000 0.494 0.62 0 60.0% 2.684 1.72 0 8.7% 5.032 2.31 0 0.2% 0.80 B. Random Walk Size (K) tè†å †gfã ç æå ä 6èCå †¨ïã é æå ä Cêåç †gtã è æå ä në Mean Std Min Failure Mean Std Min Failure Mean Std Min Failure 100 1.398 1.14 0 24.6% 7.058 2.40 1 0.0% 14.076 3.30 5 0.0% 0.79 300 1.436 1.12 0 20.2% 7.396 2.62 1 0.0% 14.894 3.87 5 0.0% 0.79 500 1.562 1.19 0 19.8% 7.634 2.78 1 0.0% 15.152 3.88 7 0.0% 0.79 1000 1.518 1.20 0 22.4% 7.544 2.71 1 0.0% 14.982 3.91 4 0.0% 0.80 C. Uniform Sampling Size (K) tè†å †gfã ç æå ä 6èCå †¨ïã é æå ä Cêåç †gtã è æå ä në Mean Std Min Failure Mean Std Min Failure Mean Std Min Failure 100 1.734 1.18 0 13.8% 8.634 2.83 1 0.0% 17.210 3.75 7 0.0% 0.79 300 1.864 1.23 0 12.6% 9.212 2.90 1 0.0% 18.496 4.07 9 0.0% 0.79 500 1.872 1.38 0 15.2% 9.486 2.98 2 0.0% 18.924 4.21 10 0.0% 0.79 1000 1.876 1.34 0 14.2% 9.482 3.14 0 0.2% 18.850 4.34 8 0.0% 0.80 A. Growth with preferential connectivity model with (i) Peers arrive and leave the network dynamically. 500K nodes. (TTL=4) 10 (ii) The algorithm must be strongly or weakly decentral- ized. By strong decentralization we mean that there Flooding 9 Random Walk Uniform 8 is no central server. In weak decentralization there 7 6 is a constant number of central servers. However, the computational resources of each central server # of hits 5 4 are of the same order of magnitude as those of an 3 average peer. In other words, a typical peer can 2 1 simulate the behavior of a central server. 0 0 100 200 300 400 500 (iii) We wish to achieve low network overhead, in terms B. Sample from the Gnutella network with 36K nodes. of messages, per addition or deletion. In the rest of (TTL=2) section. we deal only with additions. Deletions can 18 be handled as in [2]. 16 14 Flooding Random Walk Uniform In paragraph IV-A we shall revisit the known ran- 12 domized algorithms for constructing sparse graphs with good expansion properties, without being concerned # of hits 10 8 about conditions (i) and (ii). We call these baseline 6 constructions. This is helpful because all known schemes 4 for constructing expander graphs under conditions (i) and 2 (ii) explicitly simulate a baseline construction. 0 0 100 200 300 400 500 All known baseline algorithms construct an expander essentially by choosing the edges incident to a vertex Fig. 3. Performance of searching in A) a network with heavy- uniformly at random, and independently for each ver- tailed statistics, and B) in a real topology. The small TTL in the real topology is due to the fact that using a larger TTL would have tex. This facilitates the probabilistic arguments that are resulted in reaching with flooding almost half of the nodes, which is subsequently used to establish expansion. We review the unrealistic. baseline probabilistic argument in Theorem 4.1. Thus, when constructing an expander on vertices, a baseline construction uses random bits per §¦¥¤¢ © £ IV. C ONSTRUCTION edge. In a distributed setting, when vertices arrive dy- In this section we turn our attention to construction and namically and a new vertex needs to extend an edge maintenance of well connected P2P topologies. Follow- to an existing vertex, one may use steps of §¦¥¤¢ © £ ing the spirit of the previous sections, as well as the work a random walk on the existing graph to find a random of [16], [2], [17], [19], we translate good connectivity existing vertex, thus simulating the baseline construction to good expansion, conductance, and separation of ¬ —§ with §¦¥¤¢ © £ message overhead on the network. This from 1. We further translate the fact that the construction is the approach of [2]. ([16] use the fact that deletions concerns a P2P network to the following conditions: happen in a random way, and they use the “randomness”