Delay Tolerant Networks by wulinqing

VIEWS: 4 PAGES: 19

									           IEG5270
Advanced Topics in P2P Networking

ASTRI System and Simulation Model




    Dah Ming Chiu
    Chinese University of Hong Kong
ASTRI System

   Speaker: Dr James Lei, ASTRI manager
   Review of ASTRI’s P2P-based content distribution platform
   Current technology trends and vision
   Suggestions for term projects
Simulation Model

   Read “A Simulation Tool for the Design and Provisioning of P2P
    Assisted Content Distribution Platform”
   Contrast P2P ecosystem vs closed P2P Platform
   For former, too hard to simulate, too many factors out of
    control (e.g. network topology, user controls, content)
   For latter, possible to simulate to improve algorithms, and to
    provision resources (e.g. server, bandwidth etc)
Levels of detail

   Overlay level (or peer level): used to simulate peer
    interactions, DHT algorithm, can scale up to 100K users
   Flow level: can simulate traffic flows with network topology,
    bottlenecks etc, can scale up to 20K users
   Packet level: more detailed than flow level; requires a lot of
    resources, hard to scale

NS-2: open source simulator for Internet protocols
PDNS: Parallel Distributed NS, can use multiple computers to scale
  up simulation
Network Simulator (NS2)

   Discrete event simulator
   Back end is in C++ and front end is in Otcl
   Provide a collaborative environment
       Open source, Freely distributed
         Share code, protocols, models, etc
         No code guarantee

       Easy comparison of similar protocols
    Example discrete events


    Consider two nodes     simple    t=1, A enqueues pkt on LAN
    on an Ethernet:        queuing   t=1.01, LAN dequeues pkt
                           model:            and triggers B

    A             B            t=1.0: A sends pkt to NIC
                                       A’s NIC starts carrier sense
                      detailed
                               t=1.005: A’s NIC concludes cs,
                      CSMA/CD
                                              starts tx
                      model:
                               t=1.006: B’s NIC begins reciving pkt
                               t=1.01: B’s NIC concludes pkt
                                       B’s NIC passes pkt to app
From Cheng Gang
    Split object model

       Splitting Implementation structure
           C++ for data (low level)
             Protocol Implementation
             Packet action
             Otcl-level user command implementation
           Otcl for control (high level)
             Configuration and control in simulation
             Periodic and triggered action

    +   running vs. writing speed
    –   Learning and debugging (two languages)


From Cheng Gang
    How to use NS?


                    Problem


    Result                           Create       Modify
Analysis/debug                      Topology   ns (.cpp/.tcl)

                  Setup/execute
                    simulation
                   with ns (.tcl)


From Cheng Gang
    Otcl programming

       Create the event scheduler
       Turn on tracing
       Create network
       Setup routing
       Create transport connection
       Create traffic
       Transmit application-level data




From Cheng Gang
    Example Otcl scripts to create network

       Nodes
        set n0 [$ns node]
        set n1 [$ns node]
       Links and queuing
        $ns <link_type> $n0 $n1 <bandwidth> <delay>
          <queue_type>
           <link_type>:  duplex-link, simplex-link
           <queue_type>: DropTail, RED, CBQ, FQ, SFQ, DRR, diffserv
            RED queues
           $ns duplex-link $n0 $n1 1Mb 10ms DropTail
                 Link between n0 and n1 is duplex, 1Mbps capacity


From Cheng Gang
    Tracing

       Trace packets on all links
           $ns trace-all [open test.out w]

    <event> <time> <from> <to> <pkt> <size>--<flowid>
      <src> <dst> <seqno> <aseqno>
      + 1 0 2 cbr 210 ------- 0 0.0 3.1 0 0
      - 1 0 2 cbr 210 ------- 0 0.0 3.1 0 0
      r 1.00234 0 2 cbr 210 ------- 0 0.0 3.1 0 0




From Cheng Gang
    PDNS

       Use a new event scheduler known as Scheduler/RTI
       RTI (Run-Time Infrastructure)
           MCAST: group communication
           TM-Kit: time management algorithms
           FM-Lib: low level communications




From Cheng Gang
    Scalability of PDNS




         Parallel execution offers 7x increase in network size for real-time
          simulation

From Cheng Gang
Hong Kong ISPs

   ISP network topology
       Hong Kong has four main ISPs:
         PCCW: DSL technology
         HK Broadband: Fiber-Ethernet
         Hutchison: Fiber-Ethernet
         iCable: CableTV

       Hong Kong IX: almost all ISPs peer at HKIX
         HK IX located at CUHK

       Generate peers according to ratio of users in each ISP
Types of nodes

   Source peer (SP)
       Is content source
       Has high uplink bandwidth
   Receiving peer (RP)
       Arrives into system at some point in time
       Starts viewing or downloading, after talking to Tracker
       Departs at some point (or after downloading)
   Tracker
       Each peer registers with Tracker upon arrival
       Tracker tells peers what other peers are in the system
User behavior

   Peer arrival rate
   Peer departure rate
       If file downloading, how soon users depart after downloading
Example simulation results (from paper)

   Case 1: P2P live streaming algorithm
       Each peer maintains a sliding window (buffer for real-time data)
       Key performance index: continuity (% chunk available at playback
        time)
       Study “wait” vs “slide” policies when chunk not available
   Case 2: P2P file downloading algorithm
       Each peer’s state is the bitmap of chunks for whole file
       Key performance index: download completion time
       Study “random” vs “Rarest First” policy for chunk selection
Evaluation of simulation performance

   With 32 processors (on 7 machines), simulated 40K peers
    scenario in a matter of hours.
   Simulation time depends approximately linearly on memory
    size
   P2P streaming and file downloading require different amount
    of memory. Which scenario requires more memory?
For Home work 1

   TA will give tutorial on how to run simulation program
   Explain what simulations to run
   You will need to explain the simulation results
   Also answer some questions about simulation configuration

								
To top