1 / 24

Interconnect simulation

Interconnect simulation. Different levels for Evaluating an architecture. Numerical models Mathematic formulations to obtain performance characteristics (close form or non-close form) Simulation Simulating the hardware in a program Emulation Prototype Operational system. system boundary.

Download Presentation

Interconnect simulation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Interconnect simulation

  2. Different levels for Evaluating an architecture • Numerical models • Mathematic formulations to obtain performance characteristics (close form or non-close form) • Simulation • Simulating the hardware in a program • Emulation • Prototype • Operational system

  3. system boundary system under study (has deterministic rules governing its behavior) exogenous inputs to system (the environment) “real” life program boundary observer computer program simulates deterministic rules governing behavior psuedo random inputs to system (models environment) “simulated” life observer Simulation *Jim Kurose, University of Massachusets, Amherst

  4. Why simulation? • real-system not available, is complex/costly or dangerous (eg: space simulations, flight simulations) • quickly evaluate design alternatives (eg: different system configurations) • evaluate complex functions for which closed form formulas or numerical techniques not available

  5. Simulation advantages and limitations • advantages: • sometimes cheaper • find bugs (in design) in advance • generality: over analytic/numerical techniques • detail: can simulate system details at arbitrary level • drawbacks: • caution: does model reflect reality? • large scale systems: lots of resources to simulate (especially accurately simulate) • may be slow (computationally expensive – 1 min real time could be hours of simulated time) • art: determining right level of model complexity • statistical uncertainty in results

  6. Types of simulators • Time driven simulation • Cycle/instructor based simulation • Stop and observe the system after a fixed time interval (cycle, instruction, etc) • Events are assumed to happen at the time interval boundary • Event driven simulation • Move from one event to another • Not at a fixed interval • Always simulate the first event in the future – this event may trigger new events before the second event.

  7. Types of simulators • For network simulation, it is more common to use event driven simulation technique. • Flow-level simulation (fluid model) • How each flow is transmitted • Topology and routing issues • Packet-level simulation • How each packet is sent from the source to the destination • More detailed packet level issues such as packet scheduling, congestion control, etc. • Flit-level simulation • How each flit goes through the network • E.g. examine the performance of wormhole routing

  8. Programming an event driven interconnect simulator • Define a set of events • E.g. Message arrival, message departure, etc • Each event will trigger the change of the state in the system • The simulator simulates the system activities for the events • Change system states • E.g. when a message starts communicating, the throughput of other messages may be affected. • Adding future events if necessary.

  9. Programming an event-driven simulator • An event driven simulator must maintain the following: • simulated time: internal (to simulation program) variable that keeps track of simulated time • system “state”: variables maintained by simulation program define system “state” • e.g., may track number (possibly order) of packets in queue, current value of retransmission timer • events: points in time when system changes state • each event has associate event time • e.g., arrival of packet to queue, departure from queue • precisely at these points in time that simulation must take action (change state and may cause new future events) • model for time between events (probabilistic) caused by external environment

  10. initialize event list get next (nearest future) event from event list time = event time process event (change state values, add/delete future events from event list) update statistics n done? Event driven simulator block diagram

  11. An example: a flow level network simulator • Input: • a list of messages as well as their arrival time • src_id, dst_id, msg_size, arrival_time • Output • the finishing time for each message • Assumption: The topology and the routing scheme is given. • Topology: Link between switches and its bandwidth • Routing: given a pair of src_id and dst_id, routing givens thelist of links along a path from source to destination.

  12. An example flow level simulator • Events • Message arrival and message departure • Modeling network activities • Given a set of active flows, we must model the transmission rates for each active flow. • Need to make assumptions • One possible assumption: the flow rate is equal to the equal share of the link bandwidth for the most loaded link along its path. • Another possible assumption: MAX-MIN fairness.

  13. An example flow level simulator • Assumption 1: the flow rate is equal to the equal share of the link bandwidth for the most loaded link along its path. • Assumption 2: MAX-MIN fairness • Active flows: 1->5, 2->3, 3->5, 4->5, link bandwidth 1Mbps • Assumption 1: 1->5, 3->5, 4->5 333Mbps, 2->3, 500Mbps • Assumption 2: 1->5, 3->5, 4->5 333Mbps, 2->3, 667Mbps 6 7 9 8 10 3 2 5 4 1

  14. An example flow level simulator • Network state: • Active messages, sizes of reminding active messages, rate for each active message, may be the finishing time for each active message based on the current data rate. • When a new message arrives, the number of active messages increases: the network state needs to be recomputed • When a message finishes, the number of active message decreases: the network state needs to be recomputed.

  15. put all messages in priority queue initialize event list get next (nearest future) (first arrival time or finishing time) get next (nearest future) event from event list time = event time time = event time Change the set of active flows Recompute the reminding message size, new rate, and new finishing time process event (change state values, add/delete future events from event list) If message finish, output time/msg update statistics n n done? done? An example flow level simulator

  16. An example flow level simulation • Will write up a homework and prepare topology and routing files. • How accurate if the simulator? • A lot of assumptions – this is common for all simulation type of work. • If the assumption or the model is off, simulation produces junk results.

  17. Another example: a packet level simulator • Objective: to investigate different packet scheduling algorithms used in routers. • Input: • a list of messages as well as their arrival time • src_id, dst_id, msg_size, arrival_time • The messages can be generated following some distribution – to evaluate the performance under different traffic conditions. • Output • the finishing time for each message

  18. An example packet level simulator • Events: • Message arrives a compute node, packet at a compute node, packet arrives at a port, packet moves to an output port, etc. • Model system activities • Modeling the compute node behavior • Model router behavior

  19. An example packet level simulator • Model system activities • Modeling the compute node behavior • When a message arrives, packetize the message, insert packets into a host packet queue (with ready time) to be injected to the network. • When a packet is received, if it is the last packet of a message, keep the statistics.

  20. An example packet level simulator • Modeling router behavior • Each input port can be modeled by an input queue • Each output port can be modeled by an output queue • Packet scheduling algorithm: when multiple packets are ready at the input queue, the algorithm determines which packet gets to be scheduled to the output queue. • Modeling router latency: after a packet is removed from an input queue, insert the packet to the output queue with a time stamp equal to current_time + latency • Modeling link latency?

  21. An example packet level simulator • Network states: • Queues on routers and end hosts, message at end hosts • The simulator basically figures out the next future event, and perform the event • A message arrives at end host: packetize the message • A packet is ready on end host: move the packet • A packet is ready on a queue: move the packet

  22. initialize event list get next (nearest future) event from event list time = event time process event (change state values, add/delete future events from event list) update statistics n done? An example packet level simulator

  23. Packet level .vs. flow level simulation • Flow level simulation has higher level of abstraction – more details are lost. • Is flow level simulation always more efficient?

  24. Network simulation packages • For network simulation, the driver is quite standard. • Difference in the modeling techniques • Quite some network simulators are available: • NS2, OpNet, Mininet, etc • Provide many common library funcationality • Allow build the network topology and routing schemes. • When to use the existing simulators and when to write one from scratch?

More Related