[OpenSTA-devel] Addition of Bandwidth Limiting Functionality
Brought to you by:
dansut
|
From: Kamal, S. \(Cognizant\) <Swa...@co...> - 2005-12-16 06:35:38
|
Hi All, We have identified and implemented a Bandwidth Limiting Functionality for= OpenSTA,the details of which are listed below. Also we are interested in contributing this back to the OpenSTA project.= Kindly let us know the procedures for the same. Details of the new Functionality: ********************************* OpenSTA Bandwidth Limiting =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Functionality: -------------- The new functionality here is to Add "Bandwidth Limiting" feature to= OpenSTA. The OpenSTA commander will have additional provision to enable= bandwidth limiting and set the bandwidth to be simulated during testing.= Bandwidth limiting is the ability to simulate a lower bandwidth network= link over a higher bandwidth link.=0D Bandwidth Limiting Algorithm: ---------------------------- The Bandwidth Limiting algorithm used is a modified version of bandwidth= limiting algorithm used in "Trickle". More information about trickle and= the source code is available at <http://monkey.org/~marius/pages/?page= =3Dtrickle>. The basic idea behind limiting bandwidth is the to limit the amount of= data read and written during each operation and introducing delays. The Steps followed are as follows: 1.If the total amount of data to be read or written is less than= the bandwidth to simulate, the read/write operation proceeds without any= change. 2.If the length of data to be sent, or the length of data requested= in the read is greater than the bandwidth to be simulated, a delay is= calculated as delay =3D (length of data / simulated rate)*1000 (where delay is in= milliseconds) The corresponding length of data would be equal to simulated rate.= Thereby adjusted_length =3D simulated_rate 3.If data is sent/received after each delay in this manner, the= traffic would become bursty. This burstiness may even result in over= shaping as network conditions are changing, and the scheduler could= allocate more I/O to the stream in question. In order to avoid burstiness,= a smoothing factor is introduced for the sleep time and transfer length.= If the calculated delay is greater than the time smoothing factor, the= delay is set equal to the time smoothing factor and the adjusted length is= calculated as delay =3D time_smoothing_factor adjusted length =3D simulated rate * time_smoothing_factor /1000 4.If the new adjusted length is too small i.e., almost equal to= zero then we set the adjusted length as the length smoothing factor and= calculate the new delay as adjusted length =3D lsmooth (where lsmooth is the length smoothing= factor) delay =3D adjusted length /rate Implementing Bandwidth Limiting Algorithm in OpenSTA: ---------------------------------------------------- As opposed to trickle, which uses synchronous sockets OpenSTA uses= Asynchronous sockets for running the tests. Hence the algorithm used in= trickle is modified to simulate Bandwidth Limiting for the Asynchronous= read and write in OpenSTA. For write the restricted length and delay time= is calculated using the algorithm and data, which is equivalent to the= adjusted length, is sent after each sleep (sleep time is equivalent to the= delay time calculated) till the whole data is sent. For read, since the sockets are asynchronous, limiting can't happen by= simply performing a read after a sleep. So the restricted length is= calculated, and a read is scheduled as per the restricted length. After= completion of each read when a call back is received from the client we= introduce a sleep. The sleep time is proportional to the data received and= is calculated as:=0D sleep_msec =3D (length)/simulated_rate*1000 (where, sleep_msec is the sleep time and simulated_rate is the restricted= read rate.) But if the sleep time calculated, is too small then the sleep would not= make any effect. Such small sleep times accumulated for each socket. Once= the accumulated time is greater than 100 milliseconds, a sleep is= initiated. Changes for the GUI:=0D -------------------- An additional checkbox has been added to the openSTA commander, using which= a user can choose whether bandwidth limiting is enabled. On selecting this= checkbox the user is allowed to edit the "receive rate"(in kilo bits) and = "send rate"(in kilo bits) for Bandwidth limiting.=0D Once the user input is captured the data has to be passed from the= Test Manager to Test Executer. Since these are two independent exe(s)= there has to be a mechanism to pass parameters between the two. OpenSTA= uses CORBA for this. This mechanism in OpenSTA is used to pass the= bandwidth limiting parameters. Also the entire bandwidth limiting= functionality is captured in the singleton class CBwtThrottle. Thanks, Swathy This e-mail and any files transmitted with it are for the sole use of the= intended recipient(s) and may contain confidential and privileged= information. If you are not the intended recipient, please contact the sender by reply= e-mail and destroy all copies of the original message.=0D Any unauthorised review, use, disclosure, dissemination, forwarding,= printing or copying of this email or any action taken in reliance on this= e-mail is strictly=0D prohibited and may be unlawful. Visit us at http://www.cognizant.com |