Presentation is loading. Please wait.

Presentation is loading. Please wait.

Www3.informatik.uni-wuerzburg.de Institute of Computer Science Department of Distributed Systems Prof. Dr.-Ing. P. Tran-Gia Efficient Simulation of Large-Scale.

Similar presentations


Presentation on theme: "Www3.informatik.uni-wuerzburg.de Institute of Computer Science Department of Distributed Systems Prof. Dr.-Ing. P. Tran-Gia Efficient Simulation of Large-Scale."— Presentation transcript:

1 www3.informatik.uni-wuerzburg.de Institute of Computer Science Department of Distributed Systems Prof. Dr.-Ing. P. Tran-Gia Efficient Simulation of Large-Scale P2P Networks: Compact Data Structures PDP 2007, Naples, Italy, February 7-9, 2007 Andreas Binzenhöfer, University of Würzburg

2 2 Andreas Binzenhöfer Authors  University of Würzburg  Andreas Binzenhöfer  Tobias Hoßfeld  Technical University of Munich  Gerald Kunzmann  Hamburg University of Technology  Kolja Eger  Technical Report  Daniel Schlosser (Würzburg)  Robert Nagel (Munich)  Jens Oberender (Passau)  Ivan Dedinski (Passau)

3 3 Andreas Binzenhöfer Categories of Simulation Efficiency

4 4 Andreas Binzenhöfer Outline  Queue Efficiency  Calendar Queue in P2P Simulations  Event Efficiency  Periodic Events  Dynamic Events  Kademlia Bucket Refreshes  State Efficiency  Process Handlers  Conclusion

5 5 Andreas Binzenhöfer Queue Efficiency Reducing the time needed to handle events

6 6 Andreas Binzenhöfer Problem Definition Hold Time = Enqueue + Dequeue Operation list heap calendar queue

7 7 Andreas Binzenhöfer Calendar Queue  Works like a regular desktop calendar  Each year has N d (=365) day  Each day consist of T d (=24) hours  Enqueue operation:Calculate index as  Dequeue operation: Move from day to day until event found Day 1Day 2Day 3Day N d Scheduled for: current year next year year after next year * *

8 8 Andreas Binzenhöfer Calendar Queue: Problems Too many days: Dequeue Operation no longer in O(1) Very long days:Enqueue Operation no longer in O(1)

9 9 Andreas Binzenhöfer 4096 days of length 100ms each

10 10 Andreas Binzenhöfer days of length 1ms each

11 11 Andreas Binzenhöfer Two Queues for User and Simulation Events joins leaves searches messages timeouts maintenance routines event file can be given to different simulators new user models without having to change the simulator log files and real traces can be translated into simulator input simulation time reduced due to the pre-calculated events event-file

12 12 Andreas Binzenhöfer Event Efficiency Reducing the number of events

13 13 Andreas Binzenhöfer 0111 Kademlia: A Structured P2P Overlay Own hash value: 0000 One entry per bucket Neighbors Distant Overlay Peers Bucket Don‘t split

14 14 Andreas Binzenhöfer Kademlia Bucket Refreshes  Roughly log 2 (n) buckets for each peer (where n = overlay size)  Refresh bucket as soon as it has not been used for one hour  Example: peer X bucket 1 bucket 2bucket 3 Time of next refresh

15 15 Andreas Binzenhöfer Kademlia Bucket Refreshes Refresh event moved every time peer uses bucket bucket i Simple Solution (no additional memory required): Obsolete refresh events are being skipped bucket i Simple Solution (additional memory required): Time consuming Algorithm: search event delete event insert new event Algorithm: search event delete event insert new event store time of next refresh at peer XXX Many redundant events

16 16 Andreas Binzenhöfer Kademlia Bucket Refreshes bucket i Improved Solution (Simulation time): Store actual time of next refresh for each bucket Improved Solution (Memory): bucket 1 bucket 2 bucket 3 current minimum log2(n)·n refresh events: 1.7 million for peers Use only one single event for all buckets of a peer Algorithm: search event delete event insert new event store time of next refresh at peer

17 17 Andreas Binzenhöfer State Efficiency Reduce memory needed to represent states

18 18 Andreas Binzenhöfer Process Handler  Avoid redundant information of parallel processes  Example – Parallel search:  Each participating peer stores similar information  This information is stored multiple times in RAM Day 1Day 2Day 3Day N d process handler R a = 3 xyz = 48

19 19 Andreas Binzenhöfer Process Handler  R a : Number of remaining pointers to the process handler  Last pointer frees memory  Advantage: Avoid redundant information Day 1Day 2Day 3Day N d process handler R a = 3 xyz = 48

20 20 Andreas Binzenhöfer Example: Search Handler  Search Handler stores  Search initiator  Searched ID  Timeout values  Number of (positive) answers  … process handler R a =3 sender=48 query=667 timeout=4567 answers=2

21 21 Andreas Binzenhöfer Conclusion  Typical structure of P2P events  allows for queue hold time of O(1)  does not require dynamic adaptation of Calendar queue  Careful design of events can dramatically reduce  simulation time  required memory  example: Kademlia bucket refreshes  Process handlers  exploit parallel/distributed nature of P2P algorithms  reduce redundant information

22 22 Andreas Binzenhöfer Q&A


Download ppt "Www3.informatik.uni-wuerzburg.de Institute of Computer Science Department of Distributed Systems Prof. Dr.-Ing. P. Tran-Gia Efficient Simulation of Large-Scale."

Similar presentations


Ads by Google