In Section 4.3, we compared the results from our model with the results of the simu-lation program, SimFairTorrent. In this section, we share more extensive simusimu-lation results.
We consider three types of upload capacity distributions: SameRate, Uniform, and Exp. SameRate distribution consists of all nodes uploading 1 blocks/s. Uniform
distribution has upload capacities distributed uniformly between 1 and 100 blocks/s.
Exp is an exponential-like distribution where the nodes are split into seven classes 1 through 7, where nodes in class i have capacity 2i.
SimFairTorrent is a discrete time simulator that checks for state changes and necessary action every clock tick. We set the clock ticks to be small enough, such that no peer sends out more than one data block between two clock ticks. Since the fastest peer in our simulation is a peer sending 128 blocks/s under the Exp distribution, setting the duration of a single clock tick to be 0.007 seconds suffices.
We now show simulation results while varying network size, experiment duration, peer capacity, and network delay.
4.5.1 Network Size
For the first set of simulations we show how the maximum deficits grow as the network size expands from 50 to 100, to 200, to 400 nodes under different upload capacity distributions. The duration of each experiment was 20 seconds or up to 2858 clock ticks. (We show later how the deficits change very little for longer time durations).
For each experiment, we recorded the absolute maximum positive and negative deficits observed by any node at any time. (The measurements were taken at the beginning and at the end of every clock tick). Figures4.7to4.9 show the range of the maximum deficits recorded for each network size. The error bars capture the range and indicate the minimum, average and the maximum recording of the maximum deficits across all of the experiments.
For the SameRate distribution, the maximum positive deficits observed by any node in any time of an experiment are 5, 5, 5, and 6 data blocks for the networks of size 50, 100, 200 and 400 nodes respectively. The maximum negative deficits are 6,
7, 7, and 8 blocks. Thus as the network grows from 50 to 400 nodes the maximum deficits increases only by 1 or 2 data blocks.
The deficits are only slightly higher for the uniform distribution where upload capacities range between 1 and 100 blocks/s. The absolute maximum deficits are 10, 11, 13, and 12, and the maximum negative deficits are 8, 10, 9 and 10 blocks for the networks of size 50, 100, 200 and 400 nodes respectively.
For the exponential-like distribution the deficits are again slightly higher. The ab-solute maximum deficits are 23, 26, 30 and 32 and the maximum negative deficits are 6, 8, 9 and 10 blocks for the networks of size 50, 100, 200 and 400 nodes respectively.
We make a few observations about these results. While one might expect that the maximum deficits would greatly increase as the range of upload capacities in a network becomes greater, these results show that the deficits stay quite small. The FairTorrent algorithm allows the nodes to quickly converge to a fair data exchange rate and thus the maximum deficits do not exceed even 1/4 of the upload capacity of a highest uploading peer that uploads at 128 blocks/s under the exponential distribution.
Another observation is that as the network size increases one might expect that as the variance in the upload capacities increases it would also cause nodes to experience a much higher deficit. However, we observe only a very slow growth in the maximum deficit with the growth in network size. For the Exp distribution the maximum deficit only increases by 50% when the network size is increased by 700%.
4.5.2 Peer’s Upload Capacity
Next, we show how the maximum deficit is correlated with the upload capacity of a node. For the uniform distribution over 20 experiments we reported the maximum positive deficit observed by any node of a given upload capacity at any time at any
0
Figure 4.7: SameRate upload capacity distribution: Maximum positive and negative deficits across all peers in a SameRate distribution for networks of size 50, 100, 200 and 400. The error bars capture the minimum, average and the maximum values of the max deficits recorded across 20 experiments
0
Figure 4.8: Uniform upload capacity distribution: Maximum positive and negative deficits across all peers in a uniform distribution for networks of size 50, 100, 200, and 400. The error bars capture the minimum, average and the maximum values of the max deficits recorded across 20 experiments
0
Figure 4.9: Exp upload capacity distribution: Maximum positive and negative deficits across all peers in a Exp distribution for networks of size 50, 100, 200, and 400. The error bars capture the minimum, average and the maximum values of the max deficits recorded across 20 experiments
experiment. Figure 4.10 shows these results. The maximum deficits observed by the nodes range from 1 to 13 data blocks, with higher capacity nodes observing higher maximum deficits. The reason, of course, is that the higher capacity nodes may need to send data blocks to more neighbors before they receive a reciprocation rate equal to their upload capacities. However, even a peer that uploads up to 100 blocks/s is never owed more than 13 data blocks by its neighbors, suggesting a very fast convergence.
4.5.3 Experiment Duration
Next, we show the effect of time on the growth of the maximum deficit. Figure 4.11 shows how the absolute maximum positive deficit value observed by any node grows in time under three distinct experiment for the three upload capacity distributions in a network of 200 nodes. The figure shows that the maximum deficit value reached early on in the experiment practically does not change. Over the 1000 second experiment
0 2 4 6 8 10 12 14
0 10 20 30 40 50 60 70 80 90 100
Max Deficit
Node Upload Capacity
Figure 4.10: Maximum Deficit observed by nodes of a given upload capacity over 20 experiments in a network of 200 nodes with a uniform distribution of upload capacities.
for the SameRate distribution the value of the maximum deficit changes from 4 to 5 at time 7 and then stays the same. For the Uniform distribution the last change from 8 to 9 occurs at time 27. For the Exp distribution the maximum deficit stays at 19 from time 8 to time 804, and changes to 20 at time 804.
These results highlight an interesting behavior of FairTorrent, which is for the most part quite cyclical. Once a peer finds a set of peers that will reciprocate to it it pretty much stays with the same set. When peer B reciprocates an owed data block to peer A, peer A will again prefer to send to B as the deficit with that peer is decremented (as opposed to sending to a new random peer). The reason is that when selecting a peer to send a block to, peer A breaks ties based on its locally randomized list of neighbors. If a peer B is at the start of this randomized list, then when selecting among the peers of zero deficit, peer A will always prefer peer B. Thus, peer A is likely to keep sending and receiving blocks from a subset of peers that appear in the first part of its randomized list. This behavior makes the peer-wise relationships sticky,
0 5 10 15 20
0 100 200 300 400 500 600 700 800 900 1000
Max Deficit
Time (s)
Exp Uniform SameRate
Figure 4.11: Maximum deficit observed over time in three different experiments under the SameRate, the Uniform and the Exp distributions of the upload capacities.
and the data block exchange behavior cyclical. As a result the maximum deficits accumulated at the beginning of an experiment, as peers discover their reciprocation sets for the first time, stay fairly constant throughout the experiment.
4.5.4 Network Delay
Finally, we consider an additional parameter: network delay. While previously we have assumed that any sent packet is seen by the recipient before it decides where to send the next data block, we now assume a network delay. For example, a network delay of 100 milliseconds, means that that any sent data block will only be observed 100 milliseconds after it has been sent. Figure 4.12 plots the maximum deficit over a 1000 second experiment for four different network delay values: 0, 100, 200, and 300 milliseconds for a 200 node network under the Uniform distribution of the upload capacities. The maximum deficits observed were 9, 31, 50, and 79 data blocks for the network delays of 0, 100, 200 and 300 milliseconds respectively.
Interestingly, considering a realistic network delay seems to cause an almost con-stant bump in the maximum deficit, but still keeps the overall maximum deficit small. The reason for the higher deficit is obvious. Consider a peer that uploads at 100 blocks/s that each take 300 milliseconds to reach the destination. Before the first data block reaches its destination the node would have already sent 30 data blocks without receiving reciprocation. These 30 blocks automatically contribute to the maximum deficit. Furthermore, the would-be-reciprocators may receive many blocks from other nodes as well. Thus it may take a lot more than 300 milliseconds before an average node works through its load queue and reciprocates the first packet, fur-ther allowing the high-capacity node more time to send additional data blocks. This double effect results in the 79 blocks of maximum deficit that we observed in the 300 millisecond delay case.
We also observe, that typical network delays in the Internet stay within 50 mil-liseconds between most US hosts. 100-150 milmil-liseconds may be observed between different continents. 300 ms and higher delays are extremely rare. For example, it is noted that 150 millisecond round-trip time is pretty much a limit for a reason-able voice-over-IP conversation, suggesting that much shorted delays are typically achievable for VoIP applications. For the 100ms delay, the maximum deficit that we recorded is quite low: just 9 data blocks.