optimal file distribution in peer to peer networks
play

Optimal File Distribution in Peer-to-Peer Networks Kai-Simon - PowerPoint PPT Presentation

Optimal File Distribution in Peer-to-Peer Networks Kai-Simon Goetzmann Technische Universitt Berlin goetzmann@math.tu-berlin.de joint work with Tobias Harks, Max Klimm, and Konstantin Miller ISAAC 2011, Yokohama Motivation Motivation


  1. Optimal File Distribution in Peer-to-Peer Networks Kai-Simon Goetzmann Technische Universität Berlin goetzmann@math.tu-berlin.de joint work with Tobias Harks, Max Klimm, and Konstantin Miller ISAAC 2011, Yokohama

  2. Motivation

  3. Motivation Question: How can peer-to-peer downloads be scheduled optimally?

  4. Outline ⊲ Part I: Problem Statement ⊲ Part II: Hardness ⊲ Part III: Approximation

  5. Part I Problem Statement

  6. Problem Statement 0 Instance I = ( N , c d N , c u N ) R ≥ 0 → R ≥ 0 (integrable) sending rate function c u ⊲ set N = { 1 , . . ., n } of peers 0 core ⊲ peer 0 (server) owns file of unit c u c d 1 n size at time 0 c u c d 2 2 c u c d ⊲ download capacity c d i of peer i n 1 . . . 1 2 n ⊲ upload capacity c u i of peer i ⊲ s i , j : � t � ⊲ x i ( t ) = k ∈ N s k , i ( τ ) d τ fraction of file owned by i at t 0

  7. Problem Statement 0 Instance I = ( N , c d N , c u N ) R ≥ 0 → R ≥ 0 (integrable) sending rate function c u ⊲ set N = { 1 , . . ., n } of peers 0 core ⊲ peer 0 (server) owns file of unit c u c d 1 n size at time 0 c u c d 2 2 c u c d ⊲ download capacity c d i of peer i n 1 . . . 1 2 n ⊲ upload capacity c u i of peer i ⊲ s i , j : � t � ⊲ x i ( t ) = k ∈ N s k , i ( τ ) d τ fraction of file owned by i at t 0 Symmetric peers: c d i = c u i =: c i for all i ∈ N .

  8. R ≥ 0 → R ≥ 0 is an integrable function R ≥ 0 : x i ( t ) d τ < 1 Feasible solution R ≥ 0 R ≥ 0 Feasible solution S = ( s i , j ) i , j ∈ N ⊲ s i , j : ⊲ unique sender: ∀ i ∈ N ∃ p ( i ) ∈ N : s k , i ≡ 0 ∀ k � p ( i ) ⊲ download completed: s i , j ( t ) = 0 ∀ i , j ∈ N \{ 0 } , t ∈ ⊲ upload capacity: � j ∈ N s i , j ( t ) ≤ c u ∀ i ∈ N , t ∈ i ⊲ download capacity: s p ( j ) , j ( t ) ≤ c d ∀ j ∈ N , t ∈ j

  9. R ≥ 0 → R ≥ 0 is an integrable function R ≥ 0 : x i ( t ) d τ < 1 Feasible solution R ≥ 0 R ≥ 0 Feasible solution S = ( s i , j ) i , j ∈ N ⊲ s i , j : ⊲ unique sender: ∀ i ∈ N ∃ p ( i ) ∈ N : s k , i ≡ 0 ∀ k � p ( i ) R ≥ 0 : x i ( t ) = 1 } ⊲ download completed: s i , j ( t ) = 0 ∀ i , j ∈ N \{ 0 } , t ∈ ⊲ upload capacity: � j ∈ N s i , j ( t ) ≤ c u ∀ i ∈ N , t ∈ i ⊲ download capacity: s p ( j ) , j ( t ) ≤ c d ∀ j ∈ N , t ∈ j Definition completion time: C i = inf { t ∈ makespan: M = max i ∈ N C i

  10. Part II Hardness

  11. Capacity Expansion Lemma For a peer i and a time interval [ t 1 , t 2 ] , � t 2 � ⊲ total upload of i in [ t 1 , t 2 ] : u i ( t 1 , t 2 ) = j ∈ N s i , j ( τ ) d τ t 1 ⊲ idleness of i in [ t 1 , t 2 ] : z i ( t 1 , t 2 ) = c i ( t 2 − max { C i , t 1 } ) − u i ( t 1 , t 2 ) For t ≥ 0, ⊲ X ( t ) = � i ∈ N x i ( t ) N ⊲ Z ( t ) = � i ∈ N z i ( 0 , t ) Lemma (Capacity Expansion Lemma) Let I be an instance with c = max i ∈ N c i , Then, for all solutions 1. u i ( t 1 , t 2 ) + z i ( t 1 , t 2 ) ≤ max { 0 , ( t 2 − t 1 ) c i − 1 + x i ( t 1 ) } 2. X ( k / c ) + Z ( k / c ) ≤ 2 k for all k ∈ Proof

  12. Hardness Theorem The peer-to-peer file distribution problem for heterogeneous symmetric peers is strongly NP-hard. Proof. By reduction from 3-Partition . Details �

  13. Part III Approximation

  14. Algorithmic Idea ⊲ need combinatorial lower bound ◮ u i ( t 1 , t 2 ) + z i ( t 1 , t 2 ) ≤ max { 0 , ( t 2 − t 1 ) c i − 1 + x i ( t 1 ) } ⊲ Algorithmic Idea: let algorithm satisfy this inequality for all peers with x i ( t 1 ) > 0 with equality ◮ Every peer downloads at full download rate ⇒ complete peers in order 1 , . . . , n where c 1 ≥ · · · ≥ c n ◮ no idleness as long not every download started ⊲ Problem: This might not be possible ⊲ Solution: Time-varying resource augmentation ◮ allow to violate upload and download constraints by a √ factor of 2

  15. Scale-Fit Algorithm ⊲ Sort peers such that c 1 ≥ · · · ≥ c n (Peer 0 has unused upload capacity c at time 0) ⊲ Consider next point in time t where some peer i has unused upload capacity c ◮ Choose downloaders: Choose next k peers i 1 , . . . , i k such √ √ 2 ≤ � that c / j = i 1 ,..., i k c j ≤ 2 c ◮ Resource augmentation: ◮ If c < � c j , augment upload capacity s.t. c = � c j ◮ If � c j < c , augment download capacities s.t. c = � c j ◮ Peers j = i 1 , . . . , i k download from i with full capacity 1 ◮ Release capacity: For j = i 1 , . . . , i k , at time t + α c j ◮ Peer j has unused capacity c j ◮ Peer i has unused capacity c j · c / � j ′ c j ′ ⊲ When all downloads are finished, stop.

  16. Scale-Fit Example Example c 0 = 5, c 1 = 3, c 2 = 3, c 3 = 5 / 2, c 4 = 2, and c 5 = 2.

  17. Scale-Fit Example Example c 0 = 5, c 1 = 3, c 2 = 3, c 3 = 5 / 2, c 4 = 2, and c 5 = 2. c 0 time 0 1 11 5 3 15 6

  18. Scale-Fit Example Example c 0 = 5, c 1 = 3, c 2 = 3, c 3 = 5 / 2, c 4 = 2, and c 5 = 2. c 0 peer 1 time 0 1 11 5 3 15 6

  19. Scale-Fit Example Example c 0 = 5, c 1 = 3, c 2 = 3, c 3 = 5 / 2, c 4 = 2, and c 5 = 2. peer 2 c 0 peer 1 time 0 1 11 5 3 15 6

  20. Scale-Fit Example Example c 0 = 5, c 1 = 3, c 2 = 3, c 3 = 5 / 2, c 4 = 2, and c 5 = 2. c 1 peer 2 c 0 peer 1 time 0 1 11 5 3 15 6

  21. Scale-Fit Example Example c 0 = 5, c 1 = 3, c 2 = 3, c 3 = 5 / 2, c 4 = 2, and c 5 = 2. c 1 peer 2 c 0 peer 3 peer 1 time 0 1 11 5 3 15 6

  22. Scale-Fit Example Example c 0 = 5, c 1 = 3, c 2 = 3, c 3 = 5 / 2, c 4 = 2, and c 5 = 2. c 1 peer 2 peer 4 c 0 peer 3 peer 1 time 0 1 11 5 3 15 6

  23. Scale-Fit Example Example c 0 = 5, c 1 = 3, c 2 = 3, c 3 = 5 / 2, c 4 = 2, and c 5 = 2. c 1 peer 2 peer 4 c 0 peer 3 peer 1 time 0 1 11 5 3 15 6

  24. Scale-Fit Example Example c 0 = 5, c 1 = 3, c 2 = 3, c 3 = 5 / 2, c 4 = 2, and c 5 = 2. c 1 peer 5 peer 2 peer 4 c 0 peer 3 peer 1 time 0 1 11 5 3 15 6

  25. Scale-Fit Example Example c 0 = 5, c 1 = 3, c 2 = 3, c 3 = 5 / 2, c 4 = 2, and c 5 = 2. Scaling factor: 5 / 4 c 1 peer 5 peer 2 peer 4 c 0 c 0 peer 3 peer 1 time time 0 5 11 25 0 1 11 5 12 12 24 3 15 6

  26. Scale-Fit Example Example c 0 = 5, c 1 = 3, c 2 = 3, c 3 = 5 / 2, c 4 = 2, and c 5 = 2. Scaling factor: 5 / 4 c 1 peer 5 peer 2 peer 4 c 0 c 0 peer 3 peer 1 peer 1 time time 0 5 11 25 0 1 11 5 12 12 24 3 15 6

  27. Scale-Fit Example Example c 0 = 5, c 1 = 3, c 2 = 3, c 3 = 5 / 2, c 4 = 2, and c 5 = 2. Scaling factor: 5 / 4 c 1 peer 5 peer 2 peer 4 peer 2 c 0 c 0 peer 3 peer 1 peer 1 time time 0 5 11 25 0 1 11 5 12 12 24 3 15 6

  28. Scale-Fit Example Example c 0 = 5, c 1 = 3, c 2 = 3, c 3 = 5 / 2, c 4 = 2, and c 5 = 2. Scaling factor: 5 / 4 c 1 c 1 peer 5 peer 5 peer 2 peer 4 peer 2 peer 4 c 0 c 0 peer 3 peer 1 peer 3 peer 1 time time 0 5 11 25 0 1 11 5 12 12 24 3 15 6

  29. Analysis of Scale-Fit I Theorem √ If c 0 ≥ c i ∀ i ∈ N, then Scale-Fit is a 2 2 -approximation. = � M n

  30. Analysis of Scale-Fit I Theorem √ If c 0 ≥ c i ∀ i ∈ N, then Scale-Fit is a 2 2 -approximation. n ≤ M ∗

  31. Analysis of Scale-Fit I Theorem √ If c 0 ≥ c i ∀ i ∈ N, then Scale-Fit is a 2 2 -approximation. T 0 n ≤ M ∗

  32. Analysis of Scale-Fit I Theorem √ If c 0 ≥ c i ∀ i ∈ N, then Scale-Fit is a 2 2 -approximation. ! ≤ M ∗ T 0 n ≤ M ∗

  33. Analysis of Scale-Fit I Theorem √ If c 0 ≥ c i ∀ i ∈ N, then Scale-Fit is a 2 2 -approximation. ⊲ Assume X ∗ ( T 0 ) = n > � X ( T 0 ) � X ( T 0 ) T 0 n

  34. Analysis of Scale-Fit I Theorem √ If c 0 ≥ c i ∀ i ∈ N, then Scale-Fit is a 2 2 -approximation. ⊲ Assume X ∗ ( T 0 ) = n > � X ( T 0 ) ⊲ T 1 = T 0 − 1 / c k 0 T 1 k 0 T 0 n

  35. Analysis of Scale-Fit I Theorem √ If c 0 ≥ c i ∀ i ∈ N, then Scale-Fit is a 2 2 -approximation. ⊲ Assume X ∗ ( T 0 ) = n > � X ( T 0 ) ⊲ T 1 = T 0 − 1 / c k 0 � X ( T 1 ) ⊲ � X ( T 1 ) < X ∗ ( T 1 ) T 1 . . . k 0 T 0 n

  36. Analysis of Scale-Fit I Theorem √ If c 0 ≥ c i ∀ i ∈ N, then Scale-Fit is a 2 2 -approximation. ⊲ Assume k ℓ X ∗ ( T 0 ) = n > � X ( T 0 ) T ℓ ⊲ T 1 = T 0 − 1 / c k 0 ⊲ � X ( T 1 ) < X ∗ ( T 1 ) T 1 . . . k 0 T 0 ⊲ � X ( T ℓ ) < X ∗ ( T ℓ ) , k ℓ = 1 n Contradiction!

  37. Scale-Fit Theorem For the peer-to-peer file distribution problem with heterogeneous symmetric peers, the following holds √ 1. If c 0 ≥ c 1 , Scale-Fit is a 2 2 -approximation 2. If c 0 < c 1 , uploading the file to peer 1 and applying √ Scale-Fit is a ( 1 + 2 2 ) -approximation.

  38. Conclusion ⊲ Optimal peer-to-peer file distribution with heterogenous symmetric peers is strongly NP-hard √ ⊲ There is a ( 1 + 2 2 ) -approximation Not in this talk: ⊲ Homogenous symmetric peers are easy (even if the server has a different capacity) ⊲ Fixed number of peers is easy Open problems: ⊲ better approximation factor, PTAS, asymmetric peers, restricted connectivity, file divided in chunks...

Recommend


More recommend