Traffic Shaping (Part 2)

Similar documents
Efficiency of Dynamic Pricing in Priority-based Contents Delivery Networks

2 in a competitive environment providers will need to price services in a manner that takes some account of network resource usage [14,2]. There are m

State-Dependent Pricing and Its Economic Implications 1

Multi Token Based Location Sharing for Multi UAV Systems

Communicate and Collaborate with Visual Studio Team System 2008

************************************************************************ ************************************************************************

Operations and Supply Chain Management Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Transport Layer Principles

Real-Time Systems. Modeling Real-Time Systems

Real-Time and Embedded Systems (M) Lecture 4

Multi-Level µtesla: A Broadcast Authentication System for Distributed Sensor Networks

Designed with the Programmer in Mind

CASE STUDY: SIMULATION OF THE CALL CENTER ENVIRONMENT FOR COMPARING COMPETING CALL ROUTING TECHNOLOGIES FOR BUSINESS CASE ROI PROJECTION

STATISTICAL TECHNIQUES. Data Analysis and Modelling

Copyright c 2009 Stanley B. Gershwin. All rights reserved. 2/30 People Philosophy Basic Issues Industry Needs Uncertainty, Variability, and Randomness

COMPUTER SIMULATION OF ENZYME KINETICS

PLANNING AND CONTROL FOR A WARRANTY SERVICE FACILITY

ENGG4420 CHAPTER 4 LECTURE 3 GENERALIZED TASK SCHEDULER

Optimized Virtual Resource Deployment using CloudSim

GENERALIZED TASK SCHEDULER

Lab 6 - Pumping Test. Pumping Test. Laboratory 6 HWR 431/

Sizing SAP Hybris Billing, pricing simulation Consultant Information for Release 1.1 (et seq.) Document Version

Harold s Hot Dog Stand Part I: Deterministic Process Flows

SAP Public Budget Formulation 8.1

The integration of online and offline channels

Clock-Driven Scheduling

Operations Research Models and Methods Paul A. Jensen and Jonathan F. Bard. Inventory Level. Figure 4. The inventory pattern eliminating uncertainty.

Triage: Balancing Energy and Quality of Service in a Microserver

Chapter 4. Models for Known Demand

Sizing Component Extension 6.0 for SAP EHS Management

DEADLINE MONOTONIC ALGORITHM (DMA)

Passenger Batch Arrivals at Elevator Lobbies

Justifying Simulation. Why use simulation? Accurate Depiction of Reality. Insightful system evaluations

Tips for Deploying Wireless Networks for AS/RS and AGV Systems. Calvin Chuko Product Manager

Capacity Dilemma: Economic Scale Size versus. Demand Fulfillment

Chapter 6: CPU Scheduling. Basic Concepts. Histogram of CPU-burst Times. CPU Scheduler. Dispatcher. Alternating Sequence of CPU And I/O Bursts

Chapter III TRANSPORTATION SYSTEM. Tewodros N.

Task 1 For Task 1, the outlet was set as a zero-gauge pressure outlet, which is the same outlet condition as the five smaller pipes.

Lecture Note #4: Task Scheduling (1) EECS 571 Principles of Real-Time Embedded Systems. Kang G. Shin EECS Department University of Michigan

Intro to O/S Scheduling. Intro to O/S Scheduling (continued)

Roadmap. Tevfik Koşar. CSE 421/521 - Operating Systems Fall Lecture - V CPU Scheduling - I. University at Buffalo.

A Reference Model of Real-Time Systems

Stride Scheduling. Robert Grimm New York University

In-class Exercise BSAD 141 Entity/Activity Table, Context Diagram, Physical DFD exercise

214 Transportation Carrier Shipment Status Message

Principles of Operating Systems

Module 3 Establishing and Using Service Level and Response Time Objectives

Kx for Telecommunications

Joint design standard for running times, dwell times and headway times

Multi-Stage Control and Scheduling

Roadmap. Tevfik Ko!ar. CSC Operating Systems Spring Lecture - V CPU Scheduling - I. Louisiana State University.

On the Comparison of CPLEX-Computed Job Schedules with the Self-Tuning dynp Job Scheduler

Computer Models Using Spreadsheets to Study Heat Engine Thermodynamics

WHITE PAPER. Count your inventory in the right way for right result

Techniques for Networking Research

Workshop TA2: Open Logistics Interconnection Model & Protocols

THE RATIONAL METHOD FREQUENTLY USED, OFTEN MISUSED

all experiments when the analyses for this paper were conducted. The number of users that we report below for the earlier experiments is therefore mod

SINGLE MACHINE SEQUENCING. ISE480 Sequencing and Scheduling Fall semestre

Real-Time Scheduling Theory and Ada

FRAM First Steps How to Use FRAM and the FMV

AB. OUR ISO CONFORMANCE AUDIT QUESTIONNAIRES 8. ASSESS HOW WELL YOU CONFORM TO ISO S REMEDIAL REQUIREMENTS

The present ACER Guidance to ENTSOG provides a framework for the development of a

Sizing SAP Central Process Scheduling 8.0 by Redwood

Chapter 5 Evaluating Classification & Predictive Performance

The BEST Desktop Soft Real-Time Scheduler

Modeling of competition in revenue management Petr Fiala 1

The Logic of Flow: Some Indispensable Concepts

Locational Marginal Pricing (LMP): Basics of Nodal Price Calculation

Inventory Control Model

Economics 102 Summer 2015 Answers to Homework #2 Due Tuesday, June 30, 2015

Global position system technology to monitoring auto transport in Latvia

LTE NETWORK DESIGN FROM A TECHNO-ECONOMIC PERSPECTIVE

New product development game (NPD game)

Advanced Metering Infrastructure (AMI) Program C3 - Customer Prepays for Services

Swift mode changes in memory constrained real-time systems

System Catalogue. Medical Waste and Linen Transfer System Living a Safe Future Living the Dream. System Catalogue

Bill.Com An On Line A/P (Bill Paying) System

Infor LN UI Sizing Guide

3GPP2 C TSG-C

An Approach to Predicting Passenger Operation Performance from Commuter System Performance

Lecture 11: CPU Scheduling

Case study: InfiniBand CM Parameter Tuning

Gap Filler for Satellite DAB to Vehicular and Portable Receivers

Infor LN UI 11.3 Sizing Guide

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

Agile Requirements with User Stories. Overview

ELECTRICITY at WORK REGULATIONS

Motivating Examples of the Power of Analytical Modeling

Guten Tag. (good day)

Planning the Capacity of a Web Server: An Experience Report D. Menascé. All Rights Reserved.

Intent Traffic. Gold Medal. Intent Traffic 2/22/2018

MYO. Residential Internet Access and Telephone Services. Pricing and Services Information Guide. Connecting People Workplaces and Communities

Persistence Tracking in a Retro-commissioning Program

IB Economics Competitive Markets: Demand and Supply 1.4: Price Signals and Market Efficiency

Aldelo Media Display User Manual. PUBLISHED BY Aldelo, LP 6800 Koll Center Parkway, Suite 310 Pleasanton, CA Copyright by Aldelo, LP

The Foundations of Microeconomics

Dispatch Signal & Locational Marginal Pricing (LMP)

Proceedings of the 2015 Winter Simulation Conference L. Yilmaz, W. K. V. Chan, I. Moon, T. M. K. Roeder, C. Macal, and M. D. Rossetti, eds.

OPERATING SYSTEMS. Systems and Models. CS 3502 Spring Chapter 03

Transcription:

Lab 2b Traffic Shaping (Part 2) Purpose of this lab: This lab uses the leaky bucket implementation (from Lab 2a) for experiments with traffic shaping. The traffic for testing the leaky bucket will be the Poisson, VBR video, and LAN traffic traces from Lab 1. Software Tools: This lab will use the software code from Lab 2a. What to turn in: Turn in a report with your answers to the questions in this lab, including the plots, your Java code, and the anonymous feedback form. Version 2 (February 12, 2011) Jörg Liebeherr, 2007-11. All rights reserved. Permission to use all or portions of this material for educational purposes is granted, as long as use of this material is acknowledged in all derivative works.

Table of Content Table of Content 2 Comments 2 Part 1. A Reference Traffic Generator 3 Part 2. Token Bucket Implementation 4 Part 3. Engineering Leaky Bucket Parameters 7 Part 4. (Optional) Shaping VBR video with Multiple Leaky buckets 9 Feedback Form for Lab 2b 11 Comments Part 4 is optional for an extra credit of (max.) 20%. ECE 466 LAB 2B - PAGE 2 J. Liebeherr

Part 1. A Reference Traffic Generator In this part of the lab you create a simple traffic generator that can be used for testing and tuning your leaky bucket implementation. This reference traffic generator creates a predictable periodic traffic pattern of UDP datagrams. The traffic generator takes as input parameters three values T, N, L, with the interpretation: Every T msec transmit a group of N packets back-to-back, each with a size of L bytes If the group of N packets are sent quickly, then the traffic generator sends traffic according to an arrival function A with: The long term average traffic rate of the traffic generator is given by Rate source = NL8/T bps (bits per second). For each transmitted packet, write a line to an output file that records the size of the packet and the time since the transmission of the previous packet (For the first packet, the time is zero), e.g., the file has the format: SeqNo Time since last arrival Size (in µsec) (in Bytes) 1 0 320 2 934 99 3 2293 27 Exercise 1.1 Create and Test Reference Traffic Generator Build the traffic generator by modifying the implementation of the traffic generator from Lab 2a (Part 2). Run experiments for specified values of T, N, and L, where you transmit traffic from the traffic generator to the traffic sink (without a leaky bucket). Evaluate the accuracy of the traffic generator by comparing the entries in the trace file (at the traffic generator) to the results written to the output file (at the sink). Use at least 10,000 data points for your evaluation. Prepare a plot that shows the difference of trace file and the output file. For example, you may create two functions that show the cumulative arrivals of the trace file and the output file, respectively, and plot them as a function of time. ECE 466 LAB 2B - PAGE 3 J. Liebeherr

Part 2. Token Bucket Implementation You are asked to implement the missing features from the leaky bucket implementation provided to you at: http://www.comm.utoronto.ca/~jorg/teaching/ece466/labs/lab2/leakybucket You only need to modify the implementation of the TokenBucket class. The provided implementation does not correctly update the value of LB and does not correctly compute the time for waking up the Bucket Sender. An instance of the TokenBucket is created by calling the constructor of this class with two parameters size and rate, where o size_lb is the maximum content of the token bucket (LB max ), o rate_lb is the token generation rate in tokens per second (r). Other classes can query the TokenBucket about the content of the token bucket, and can request to remove tokens from the bucket. The following requests are available: o o o getnotokens: Returns number of tokens in bucket. removetokens(x): Request to remove X tokens from the bucket. The method returns false if there are less than X tokens in the bucket. getwaitingtime(x): Returns the waiting time (in nanoseconds) until bucket has X tokens. Note that there is no guarantee that there will be enough tokens at the returned time (someone else may have removed tokens). Exercise 2.1 Complete the implementation of the Token Bucket Complete the implementation of the TokenBucket class by providing the algorithms for updating the contents of the token bucket, and executing the requests getnotokens, removetokens, getwaitingtime. Hints: The contents of the token bucket does not need to be kept updated at all times. It is sufficient to update the token bucket only when there is a request made to TokenBucket. Be consistent about whether a single token corresponds to a Bit or a Byte. Refer to the documentation of the classes available at: http://www.comm.utoronto.ca/~jorg/teaching/ece466/labs/lab2/doc/index.html Exercise 2.2 Validate your implementation Design and conduct a series of measurement experiments that show that your implementation of the leaky bucket is correct. The setup of the experiments is as seen in Lab 2a: ECE 466 LAB 2B - PAGE 4 J. Liebeherr

Use the reference traffic generator from Part 1 to create a deterministic traffic stream with known properties. When you conduct a measurement experiment, record relevant data (The code for this should already be available): At the traffic generator: For each transmitted packet, record the size of the packet and the time since the previous packet transmission (For the first packet, the time is zero). At the Leaky Bucket: Upon each packet arrival, write a line to an output file that records the size of the packet and the time since the arrival of the last packet (For the first packet, the time is zero). Also recorded are the number of tokens (LB(t)) in the leaky bucket and the backlog in the buffer (B(t)) after the arrival of the packet. At the traffic sink: For each incoming packet, write a line to an output file that records the size of the packet and the time since the arrival of the previous packet (For the first packet, the time is zero). Use a packet size L=100 Bytes for all experiments. For the rate parameter at the traffic generator (Rate source < rate_lb) and at the Leaky Bucket (Rate source < rate_lb), select rates in the range 0.5 5 Mbps. Conduct the following measurement experiments: 1. Rate source < rate_lb, N =1, size_lb = 100 Bytes: Here, the long term rate of the source is smaller than the rate allowed by the leaky bucket. With N=1, the traffic source generates single packets that are equally spaced. Expected observations: The Token Bucket has always sufficient tokens. There is never a backlog in the Buffer. 2. Rate source < rate_lb, N =10, size_lb = 500 Bytes: Here, the long term rate of the source is smaller than the rate allowed by the leaky bucket. The maximum burst size at the source is 10 packets, however, the leaky bucket allows bursts to consist of at most five packets. ECE 466 LAB 2B - PAGE 5 J. Liebeherr

Expected observations: Whenever a burst (group) of 10 packets arrives, the Leaky Bucket releases 5 packets quickly, and then spaces the remaining packets out as determined by the rate parameter. The backlog in the Buffer depends on the rate at which the burst of packets arrives, and the rate at which the Leaky Bucket can transmit a packet. The maximum backlog should be somewhere between 5-9 packets. 3. Rate source rate_lb, N =1, size_lb = 100 Bytes: Here, the arrival rate of traffic is approximately equal to the long term rate of the Leaky Bucket. (To prevent persistent overflows, it is recommended that the arrival rate is a little smaller than the rate of the Leaky Bucket). Expected observations: This setting can be used to test if your Leaky Bucket implementation can support the data rates of the source. If the Leaky Bucket can keep up with the arrival rate, then there should never be a backlog in the Buffer. On the other hand, if the Buffer builds up and eventually overflows, then the Leaky Bucket implementation is too slow. Exercise 2.3 Generate plots for the experiments Use the data saved in the measurement experiments to generate a series of plots. For each experiment above, prepare a single plot that shows the cumulative arrival function as a function of time of: The transmissions of the reference traffic generator; The arrivals at the leaky bucket; The arrivals at the traffic sink. For each experiment, provide a second plot that shows the content of the token bucket and the backlog in the Buffer as a function of time. Exercise 2.4 Maximum rate of Leaky Bucket Determine the maximum arrival rate of traffic that can be supported by your Leaky Bucket. Support your findings with an experiment and (at least) one data plot. Lab Report: Describe the design of your implementation for the Token Buffer. Include your source code in the lab report. (Only include the source code of methods that you have modified). For Exercises 2.2 and 2.3, provide the set of plots and include a description of the plots. Describe your observations in each of the experiments. For Exercise 2.4 describe how you determined the maximum supported arrival rate, and discuss any graph that you generated to support your findings. ECE 466 LAB 2B - PAGE 6 J. Liebeherr

Part 3. Engineering Leaky Bucket Parameters The task in this part of the lab is to determine leaky bucket parameters for the three traffic sources used in Labs 1 and 2a, consisting of Poisson traffic, compressed video, and the Bellcore Ethernet traffic trace. The tracefiles are available from the usual places: Poisson traffic: http://www.comm.utoronto.ca/~jorg/teaching/ece466/labs/lab1/poisson3.data Video trace file: http://www.comm.utoronto.ca/~jorg/teaching/ece466/labs/lab1/movietrace.data Ethernet traffic: http://www.comm.utoronto.ca/~jorg/teaching/ece466/labs/bc-paug89-small.tl The Leaky Bucket parameters must be selected subject to (all) of the following constraints: The objective is to smooth the traffic as much as possible, by spacing out packets, but without delaying traffic by more than 100ms (milliseconds). The required size of the buffer in the Leaky Bucket should be as small as possible, but the buffer should be large enough so that no overflows occur. The rate of the leaky bucket should be at least equal to the average rate of the traffic source, and less than the peak rate of the traffic source (In Lab 1, average and peak rate where calculated for each of the traffic sources). There is generally a whole family of solutions for size_lb and rate_lb that can satisfy the above constraints. Your choice of parameters must trade-off the desire to smooth the traffic rate (small value for rate_lb) or to reduce the burst size of the output of the leaky bucket (small value for size_lb) Note: Using the topics covered in the lecture, you can compute the required parameters without resorting to trial and error. To do this, you need to compute the empirical envelope of each traffic source, and use the service curve S(t) = size_lb + rate_lb * t. ECE 466 LAB 2B - PAGE 7 J. Liebeherr

Exercise 3.1 (Long-term) Bandwidth is cheap For each of the three traffic sources (Poisson, Video, Ethernet), determine the leaky bucket parameters that satisfy the above constraints. When you have to choose between increasing rate_lb or size_lb, your preference should be to increase rate_lb. For the parameters that you select, generate a plot that shows the cumulative arrival function as a function of time for arrivals at the leaky bucket; arrivals at the traffic sink. Also plot the content of the token bucket and the backlog in the Buffer as a function of time. Exercise 3.2 (Long-term) Bandwidth is expensive Repeat the steps of Exercise 3.2, but with a different assumption. Now, when you have to choose between increasing rate_lb or size_lb, your preference should be to increase size_lb. Lab Report: Discuss your method for selecting the leaky bucket parameters. For Exercises 3.1 and 3.2, provide the set of plots and include a description of the plots. Describe your observations in each of the experiments. Compare the results for the cheap bandwidth and expensive bandwidth scenarios. Compare the results for the three traffic types. For example, which type of traffic is most demanding in terms of bandwidth or memory requirements? Which type of traffic benefits the most from traffic shaping? Support your findings with data (plots). ECE 466 LAB 2B - PAGE 8 J. Liebeherr

Part 4. (Optional) Shaping VBR video with Multiple Leaky buckets The regulation of VBR video traffic with a leaky bucket has to address the following two problems: Since the size of a frame can be much larger than the maximum packet size (in the video trace file, the maximum frame size exceeds 600 KB), yet the time lag between frames is relatively long, one would like to select leaky bucket parameters that stretch the transmission of a frame over the entire 33 ms. In order to reduce the long-term resource consumption of the VBR video source, one would like to set the leaky bucket rate parameter to a value that is close to the average rate of the VBR source. To satisfy both constraints, one leaky bucket is clearly not sufficient. A possible (and realized) solution to this problem is to regulate VBR video traffic by two leaky buckets put in series: The first leaky bucket controls the peak rate, by spacing out the transmission of a frame over a longer duration; The second leaky bucket controls the average rate of the VBR source. An illustration of a dual leaky bucket is shown in the figure below. An arriving packet must withdraw tokens from both leaky buckets. If one of the two buckets does not have enough tokens, the packet must wait until sufficient tokens are available in both buckets. LB 1 LB 2 B(t) Exercise 4.1 Dual Leaky Traffic Shaper Revise the Leaky Bucket implementation to build a traffic shaper that realizes a dual leaky bucket. The leaky bucket has four parameters (LB 1, r 1, LB 2, r 2 ), for the size and rate of the leaky buckets. As before, the Leaky Bucket receives data from a traffic generator and transmits the output to a traffic sink. Build a traffic generator (of your choice) that can be used to demonstrate the correctness and accuracy of your implementation. Provide plots that illustrate how you tested the implementation. ECE 466 LAB 2B - PAGE 9 J. Liebeherr

Exercise 4.2 Selecting dual leaky bucket parameters for a VBR video source Your task is to control the video trace with your dual-leaky bucket implementation. Transmitted packets are not permitted to exceed 1480 Bytes. So, some frames must be divided up into multiple packets. Your task is to make a `good selection for the parameters of the dual leaky. The selection of parameters requires you to tradeoff multiple considerations: 1. The maximum buffer size (and the maximum waiting time) should not be too large; 2. The average rate allocation should not be much larger than the average rate of the VBR source (to avoid over-allocation of bandwidth); 3. The number of packets that can be transmitted at once (this is determined by min(lb 1, LB 2 )), should be small. Transmit the video source from the traffic generator using the data in file: http://www.comm.utoronto.ca/~jorg/teaching/ece466/labs/lab1/movietrace.data. Prepare a plot that shows the differences between the trace file and the output file, as a function of time. Prepare plots that depict the size of the leaky bucket LB(t) and the backlog in the buffer B(t) as a function of time. What percentage of time is there a backlog at the leaky buckets? What is the longest backlog at the leaky buckets? Prepare a plot that shows the differences between the trace file and the output file, as a function of time. Also provide a plot that shows the backlog in the buffer B(t) as a function of time. Mark the longest backlog in the buffer and the maximum waiting time. Lab Report: Describe the design of your implementation for the Dual Leaky Bucket. Include your source code in the lab report. Include and discuss how you have tested the implementation. Discuss your method for selecting the leaky bucket parameters. Use plots to justify your choices. Provide the plots and the answers performed in Exercise 4.2. ECE 466 LAB 2B - PAGE 10 J. Liebeherr

Feedback Form for Lab 2b Complete this feedback form at the completion of the lab exercises and submit the form when submitting your lab report. The feedback is anonymous. Do not put your name on this form and keep it separate from your lab report. For each exercise, please record the following: Part 1. A Reference Traffic Generator Difficulty (-2,-1,0,1,2) -2 = too easy 0 = just fine 2 = too hard Interest Level (-2,-1,0,1,2) -2 = low interest 0 = just fine 2 = high interest Time to complete (minutes) Part 2. Token Bucket Implementation Part 3. Engineering Leaky Bucket Parameters Part 3. Shaping VBR video with Multiple Leaky buckets Please answer the following questions: What did you like about this lab? What did you dislike about this lab? Make a suggestion to improve the lab. ECE 466 LAB 2B - PAGE 11 J. Liebeherr