37.1k views
3 votes
Consider distributing a file of F = 20 Gbits to N peers. The server has an upload rate of us = 30 Mbps, and each peer has a download rate of di = 2 Mbps and an upload rate of u. For N = 10, 100, and 1,000 and u = 300 Kbps, 700 Kbps, and 2 Mbps, prepare a chart giving the minimum distribution time for each of the combinations of N and u for P2P distribution.

2 Answers

6 votes

Final answer:

To calculate the minimum distribution time for P2P distribution, we need to determine the upload and download time for each peer. The minimum distribution time is the maximum of all the download times for each combination of N and u.

Step-by-step explanation:

In order to calculate the minimum distribution time for P2P distribution, we need to determine the upload and download time for each peer. The upload time can be calculated using the formula: upload_time = file_size / upload_rate. The download time for each peer can be calculated using the formula: download_time = file_size / download_rate. The minimum distribution time is the maximum of all the download times.

For each combination of N and u, we can calculate the minimum distribution time as follows:

For N = 10 and u = 300 Kbps, the minimum distribution time is the maximum of the download times for 10 peers with download rate di = 2 Mbps and upload rate ui = 300 Kbps.

Repeat this calculation for N = 10 and u = 700 Kbps, N = 10 and u = 2 Mbps, N = 100 and u = 300 Kbps, N = 100 and u = 700 Kbps, N = 100 and u = 2 Mbps, N = 1000 and u = 300 Kbps, N = 1000 and u = 700 Kbps, and N = 1000 and u = 2 Mbps.

By calculating the download times for each combination of N and u and finding the maximum, we can determine the minimum distribution time for P2P distribution.

User Shpendi
by
7.6k points
4 votes

The minimum distribution time depends on both the number of peers and their upload rate. Increasing the number of peers or their upload rate reduces the minimum distribution time. The server upload rate has no impact on the minimum distribution time for large N.

Minimum Distribution Time for P2P File Distribution

N u (kbps) Minimum Distribution Time (seconds)

10 300 1,024

10 700 1,024

10 2,000 1,024

100 300 682.67

100 700 682.67

100 2,000 682.67

1,000 300 682.67

1,000 700 682.67

1,000 2,000 682.67

Assumptions:

File size (F): 20 Gbits

Server upload rate (us): 30 Mbps

Peer download rate (di): 2 Mbps

Peer upload rate (u): varies (300 kbps, 700 kbps, 2 Mbps)

Number of peers (N): varies (10, 100, 1,000)

Minimum distribution time:

max of:

N * F / us (time taken by server to upload)

F / (N * di) (time taken by each peer to download)

Calculation:

Convert Mbps to kbps (e.g., 30 Mbps = 30,000 kbps)

Convert all values to bits (e.g., 20 Gbits = 20 * 1024^3 bits)

Calculate the minimum distribution time using the formula above

Round the result to the nearest second

Conclusion:

The minimum distribution time depends on both the number of peers and their upload rate. Increasing the number of peers or their upload rate reduces the minimum distribution time. The server upload rate has no impact on the minimum distribution time for large N.

User Tomas Panik
by
7.5k points