39
1 BitHoc: BitTorrent for wireless ad hoc networks Jointly with: Chadi Barakat Jayeoung Choi Anwar Al Hamra Thierry Turletti EPI PLANETE 28/02/200 8 MAESTRO/PLANETE INFORMEL SEMINARY Mohamed Karim Sbaï

BitHoc: BitTorrent for wireless ad hoc networks

  • Upload
    noelle

  • View
    41

  • Download
    4

Embed Size (px)

DESCRIPTION

28/02/2008. MAESTRO/PLANETE INFORMEL SEMINARY. BitHoc: BitTorrent for wireless ad hoc networks. Mohamed Karim Sbaï. Jointly with: Chadi Barakat Jayeoung Choi Anwar Al Hamra Thierry Turletti. EPI PLANETE. Wireless ad hoc networks. - PowerPoint PPT Presentation

Citation preview

Page 1: BitHoc: BitTorrent for wireless                 ad hoc networks

1

BitHoc: BitTorrent for wireless ad hoc networks

Jointly with:Chadi BarakatJayeoung Choi

Anwar Al HamraThierry Turletti

EPI PLANETE

28/02/2008 MAESTRO/PLANETE INFORMEL SEMINARY

Mohamed Karim Sbaï

Page 2: BitHoc: BitTorrent for wireless                 ad hoc networks

2

Wireless ad hoc networks

No central administration No base station Nodes are both hosts and routers Need for multi-hop routing approaches The connectivity is ensured thanks to

the collaboration of nodes in forwarding and routing messages of each others

It is the P2P paradigm in the network layer.

Page 3: BitHoc: BitTorrent for wireless                 ad hoc networks

3

P2P file sharing applications

No central server Users are both clients and servers :

They download content and share some of their upload capacity to serve other users.

The global capacity of the system grows thanks to their collaboration.

This is the P2P paradigm in the overlay.

Page 4: BitHoc: BitTorrent for wireless                 ad hoc networks

4

P2P file sharing in wireless ad hoc

networks : constraints

Routing overhead Transport protocols performance drops

seriously in wireless multi-hop paths P2P file sharing solutions are topology

unaware : Overlay neighbors are selected independently of their locations.

How will such applications perform in wireless ad hoc networks ? What are the modifications (namely in overlay construction) to be made to ameliorate both download time and sharing ratios ?

Page 5: BitHoc: BitTorrent for wireless                 ad hoc networks

5

Outline Overview of BitTorrent Framework, scenario and assumptions Performance metrics Impact of the size of pieces Impact of the scope of the

neighborhood BitHoc: Our solution

Choking algorithm Piece selection strategy Some first results Choice of parameters and new

results. Conclusions and future work

Page 6: BitHoc: BitTorrent for wireless                 ad hoc networks

6

Outline Overview of BitTorrent Framework, scenario and assumptions Performance metrics Impact of the size of pieces Impact of the scope of the

neighborhood BitHoc: Our solution

Choking algorithm Piece selection strategy Some first results Choice of parameters and new

results. Conclusions and future work

Page 7: BitHoc: BitTorrent for wireless                 ad hoc networks

7

BitTorrent (1/2) a P2P efficient content distribution protocol Peer lookup:

A Client contacts a central rendezvous node named Tracker to get addresses of other clients

Sharing content: A file is cut into pieces (multi-sourcing) Each client shares some of its upload

bandwidth with other clients Torrent : peers cooperating to download

the same content Seed : a peer who finished downloading the

content and still serving other peers leecher : peer who is downloading the file

Page 8: BitHoc: BitTorrent for wireless                 ad hoc networks

8

BitTorrent (2/2) Choking algorithm: A peer chooses periodically a

set of peers with whom it opens TCP connections to upload pieces.

Only 4 simultaneous connections: 3 best uploaders + 1 a random peer (discovering

new upload capacities )

Enforce cooperation and reciprocity among peers

Piece selection strategy: When a peer receives a piece offer message from a neighbor, it selects the rarest piece in the peer list.

This increases the entropy of pieces in the network and then the chance to replicate pieces after downloading them.

Page 9: BitHoc: BitTorrent for wireless                 ad hoc networks

9

Outline Overview of BitTorrent Framework, scenario and assumptions Performance metrics Impact of the size of pieces Impact of the scope of the

neighborhood BitHoc: Our solution

Choking algorithm Piece selection strategy Some first results Choice of parameters and new

results. Conclusions and future work

Page 10: BitHoc: BitTorrent for wireless                 ad hoc networks

10

Framework, scenario and assumptions

Assumptions All nodes are peers No mobility in the network Trackerless BitTorrent : a flooding of

HELLO messages to discover all peers in the network.

Framework We added a module to NS-2

implementing BitTorrent functionalities.

Page 11: BitHoc: BitTorrent for wireless                 ad hoc networks

11

Framework, scenario and assumptions

Ad hoc scenario A grid topology of N nodes (10

per row) (distance = 40 m between nodes)

No mobility of nodes DSDV proactive routing protocol 802.11 MAC Layer with RTS/CTS-

DATA/ACK Data rate = 1 MB/s, range = 50 m

BitTorrent Scenario 1 file = 10 Mbit 1 original seed Choking period = 40 s Flooding TTL = variable Number of pieces = variable, number of blocks =

variable Block size = 1 KB

Page 12: BitHoc: BitTorrent for wireless                 ad hoc networks

12

Outline Overview of BitTorrent Framework, scenario and assumptions Performance metrics Impact of the size of pieces Impact of the scope of the

neighborhood BitHoc: Our solution

Choking algorithm Piece selection strategy Some first results Choice of parameters and new

results. Conclusions and future work

Page 13: BitHoc: BitTorrent for wireless                 ad hoc networks

13

Performance metrics of BitTorrent in ad hoc

networks

Rij : sharing ratio between i and j

Ri: sharing ratio of node i Ri = average on j of Rij ( Uij<>0 or Dij<>0)

Rh: average on nodes i located at h hops from the original seed of Ri

Fi : finish time of peer i. Fh: average on nodes i located at h hops

from the original seed of Fi

),max(

),min(

ijij

ijijij DU

DUR

Page 14: BitHoc: BitTorrent for wireless                 ad hoc networks

14

Outline Overview of BitTorrent Performance metrics Framework, scenario and assumptions Impact of the size of pieces Impact of the scope of the

neighborhood BitHoc: Our solution

Choking algorithm Piece selection strategy Some first results Choice of parameters and new

results. Conclusions and future work

Page 15: BitHoc: BitTorrent for wireless                 ad hoc networks

15

Impact of the size of pieces

Flooding TTL = MAX Small piece size = 100 blocks

Big piece size = 1000 blocks Finish time as a function of number of hops to the seed (Fh):

Page 16: BitHoc: BitTorrent for wireless                 ad hoc networks

16

Impact of the size of pieces

Average sharing ratio as a function of number of hops to the seed (Rh):

Page 17: BitHoc: BitTorrent for wireless                 ad hoc networks

17

Impact of the size of pieces

Average sharing ratio per couple of nodes for big size of pieces

Average sharing ratio per couple of nodes for small size of pieces

Page 18: BitHoc: BitTorrent for wireless                 ad hoc networks

18

Outline Overview of BitTorrent Framework, scenario and assumptions Performance metrics Impact of the size of pieces Impact of the scope of the

neighborhood BitHoc: Our solution

Choking algorithm Piece selection strategy Some first results Choice of parameters and new

results. Conclusions and future work

Page 19: BitHoc: BitTorrent for wireless                 ad hoc networks

19

Impact of the scope of the neighborhood

Flooding TTL = variable piece size = 100 blocks = small Finish time as a function of number of hops to the seed (Fh) for different TTLs:

Page 20: BitHoc: BitTorrent for wireless                 ad hoc networks

20

Impact of the scope of the neighborhood

Average sharing ratio as a function of number of hops to the seed (Rh):

Page 21: BitHoc: BitTorrent for wireless                 ad hoc networks

21

Outline Overview of BitTorrent Framework, scenario and assumptions Performance metrics Impact of the size of pieces Impact of the scope of the

neighborhood BitHoc: Our solution

Choking algorithm Piece selection strategy Some first results Choice of parameters and new

results. Conclusions and future work

Page 22: BitHoc: BitTorrent for wireless                 ad hoc networks

22

BitHoc: Our solution

Reduced neighborhood + a few connections to far peers good TCP performance in near neighborhood and more entropy of pieces for better sharing.

Peers are classified into 2 tables :NNT : Nearby Neighbors Table (hops <=2)FNT : Far Neighbors Table (hops > 2)

We redefine the choking algorithm and the piece selection strategy

Page 23: BitHoc: BitTorrent for wireless                 ad hoc networks

23

Outline Overview of BitTorrent Framework, scenario and assumptions Performance metrics Impact of the size of pieces Impact of the scope of the

neighborhood BitHoc: Our solution

Choking algorithm Piece selection strategy Some first results Choice of parameters and new

results. Conclusions and future work

Page 24: BitHoc: BitTorrent for wireless                 ad hoc networks

24

BitHoc: Choking algorithm

3 best uploaders from NNT and FNT

1 randomly: q times from NNT and 1 time from FNT- uniformly from NNT- probability p to choose a node at h hops in FNT (hm : max hops)

if then else 0

)1()(

mm hh

hhp1 mhh

Page 25: BitHoc: BitTorrent for wireless                 ad hoc networks

25

Outline Overview of BitTorrent Framework, scenario and assumptions Performance metrics Impact of the size of pieces Impact of the scope of the

neighborhood BitHoc: Our solution

Choking algorithm Piece selection strategy Some first results Choice of parameters and new

results. Conclusions and future work

Page 26: BitHoc: BitTorrent for wireless                 ad hoc networks

26

BitHoc: Piece selection strategy

Offer from NNT Rarest first in near neighborhood

Offer from FNT Absent piece strategy = accept only pieces that do not exist in near neighborhood

PIECE UPDATE messages need only to be sent to peers in NNT.

Page 27: BitHoc: BitTorrent for wireless                 ad hoc networks

27

Outline Overview of BitTorrent Framework, scenario and assumptions Performance metrics Impact of the size of pieces Impact of the scope of the

neighborhood BitHoc: Our solution

Choking algorithm Piece selection strategy Some first results Choice of parameters and new

results. Conclusions and future work

Page 28: BitHoc: BitTorrent for wireless                 ad hoc networks

28

BitHoc: Some first results

Finish time as a function of number of hops to the seed (Fh):

Page 29: BitHoc: BitTorrent for wireless                 ad hoc networks

29

BitHoc: Some first results

Average sharing ratio as a function of number of hops to the seed (Rh):

Page 30: BitHoc: BitTorrent for wireless                 ad hoc networks

30

Outline Overview of BitTorrent Framework, scenario and assumptions Performance metrics Impact of the size of pieces Impact of the scope of the

neighborhood BitHoc: Our solution

Choking algorithm Piece selection strategy Some first results Choice of parameters and new

results. Conclusions and future work

Page 31: BitHoc: BitTorrent for wireless                 ad hoc networks

31

BitHoc: Static choice of q

We establish an empiric formula for q:q = number of slots near / number of slots farGoal: send a copy of each piece to the end of the network

and wait for it to return to the middle of the network.

221

Nhq mhm

αi : average number of pieces sent at i hops in a choking slot.

Page 32: BitHoc: BitTorrent for wireless                 ad hoc networks

32

BitHoc: Static choice of q

Finding optimal q by simulations:

q = 1 for 40 nodes

q = 3 for 80 nodes

Page 33: BitHoc: BitTorrent for wireless                 ad hoc networks

33

BitHoc: Static choice of q

Validation of the empiric formula:

Page 34: BitHoc: BitTorrent for wireless                 ad hoc networks

34

BitHoc: dynamic choice of q

Topology, network conditions, etc can change each node adapts its q dynamically following its observations.

212 m

m

hhm

d Nh

q

Page 35: BitHoc: BitTorrent for wireless                 ad hoc networks

35

BitHoc: dynamic choice of q

Comparing static to dynamic choice of q:

average finish time

Page 36: BitHoc: BitTorrent for wireless                 ad hoc networks

36

BitHoc: dynamic choice of q

Comparing static to dynamic choice of q:

average sharing ratio

Page 37: BitHoc: BitTorrent for wireless                 ad hoc networks

37

Outline Overview of BitTorrent Framework, scenario and assumptions Performance metrics Impact of the size of pieces Impact of the scope of the

neighborhood BitHoc: Our solution

Choking algorithm Piece selection strategy Some first results Choice of parameters and new

results. Conclusions and future work

Page 38: BitHoc: BitTorrent for wireless                 ad hoc networks

38

Conclusions and future work

BitHoc gives better finish times and better sharing ratios than other solutions even those limiting the scope of the neighborhood BitHoc finds a good management of neighbor and piece selection strategies

Good performance in near neighborhood Better entropy by adding some few connections to far nodes Only absent pieces are sent to far nodes

Future work: Impact of mobility of nodes Studying the case of sparse overlays Optimizing lookup in wireless ad hoc networks Real implementation and testing of the protocol

Page 39: BitHoc: BitTorrent for wireless                 ad hoc networks

39

THANK YOU

E-mail: [email protected]

?