# An Adaptive Buffering Scheme for P2P Live and Time-Shifted Streaming
## 4 Performance Evaluation  
To show the effectiveness of our proposed adaptive buffering scheme in P2P live and time-shifted streaming systems, we performed extensive simulations using the PeerSim P2P simulator that supports a virtual P2P network environment. The ratio of the bandwidth between a peer and a router was set to 10-100 Mbps so that 100 Mbps, 50 Mbps, 20 Mbps, and 10 Mbps can be 10%, 50%, 20%, and 20%, respectively. The backbone bandwidth was set to 10 Gbps. The maximum number of peers to which a media server can transmit data directly and the maximum number of neighbors of each peer were set to 25 and 7, respectively. The inter-arrival and inter-leaving rates followed a Poisson distribution with a mean of 600 s. Each video had a 720-Kbps playback rate, and the size of each chunk was 30 KB. When a peer joined, it buffered at least 45 chunks of the requested video (corresponding to 15 s) to compensate for peer churn and rate fluctuations of video connections before initial playback. However, this does not mean that each peer must wait for 15 s. It could receive 45 chunks quickly if it worked in a better condition; for example, where the maximum possible number of neighbors are connected, the upload bandwidths of all neighbors are high, and network traffic is low. We also assumed that parameter \(\alpha\) used to determine the buffer area ratio was 0.9. Table 2 shows the simulation parameter values used throughout this section.  
To compare the performance of our proposed adaptive buffering scheme with the conventional fixed buffering scheme according to the number of peers, we varied the number of peers to 1200, 1800, and 2400. To show the performance of both schemes according to buffermap size, we also changed the numbers of chunks in a buffermap to 256, 512, and 1024.  
On the other hand, to reflect the fact that many peers' requests are concentrated around the live broadcasting time and the others are dispersed over the entire playback period of each video due to  
\begin{table}
\begin{tabular}{l l} \hline \hline
**Parameter** & **Default Value** \\ \hline Number of participating peers & 2400/1800/1200 \\ Bandwidth between router and peer & 100 Mbps: 240/180/120 peers \\  & 50 Mbps: 1200/900/600 peers \\  & 20 Mbps: 480/360/240 peers \\  & 10 Mbps: 480/360/240 peers \\ Backbone network bandwidth & 10 Gbps \\ Maximum service capacity of media server & 25 peers \\ Maximum number of neighbors of each peer & 7 \\ Average inter-arrival and inter-leaving rate & 600 s \\ Video playback rate & 720 Kbps \\ Chunk size & 30 KB \\ Number of chunks per buffermap & 1024/512/256 \\ Number of buffered chunks required for initial playback & 15 s (45 chunks) \\ \(\alpha\) & 0.9 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Simulation parameters.  
time-shifted viewing, we distributed all peers into three types of playback zones, as shown in Figure 5. That is, 6000 s are divided into the following three zones: zone A within 60 s from the live broadcasting time, zone B between 60 and 660 s, and zone C between 660 and 6000 s. We assigned 50%, 40%, and 10% of all peers to zones A, B, and C, respectively, for all numbers of peers: 1200, 1800, and 2400.  
We compared the performance of our proposed adaptive buffering scheme with the conventional fixed buffering scheme in terms of startup delay, jitter ratio, and the ratio of necessary chunks in a buffermap. The ratio of necessary chunks in a buffermap represents the ratio of the number of chunks actually needed by a peer to the total number of chunks that are marked as available in the buffermaps received from neighbor peers.