[Community-allwww-cvs] www/2005/devdocs ABD-SOD-003-ConnBWComputation.html, NONE, 1.1 ABD-SOD-001-AutoBwDetection.html, 1.3, 1.4 ABD-SOD-002-ABDCalibration.html, 1.2, 1.3 cayenne.html, 1.6, 1.7
rishimathew at helixcommunity.org rishimathew at helixcommunity.orgUpdate of /cvsroot/helix-client/www/2005/devdocs In directory cvs:/tmp/cvs-serv28689 Modified Files: ABD-SOD-001-AutoBwDetection.html ABD-SOD-002-ABDCalibration.html cayenne.html Added Files: ABD-SOD-003-ConnBWComputation.html Log Message: Adding Connection Bandwidth estimation document --- NEW FILE: ABD-SOD-003-ConnBWComputation.html --- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>ABD - Connection BW Computation</title> </head> <body> <ul> <li> Author: <a href="mailto:acolwell at real.com">acolwell at real.com</a> </li> <li> Created: </li> <li> Last modified: 2005-06-06 22:01:33</li> </ul> <span style="font-weight: bold;">Related Pages</span><br> <ul> <li> <a href="https://helix-client.helixcommunity.org/2005/devdocs/ABD-SOD-001-AutoBwDetection.html"><b>AutoBandwidthDetection ABD Specification and SOD</b></a> </li> <li> <a href="https://helix-client.helixcommunity.org/2005/devdocs/ABD-SOD-002-ABDCalibration.html"><b> <span class="external">AutoBandwidthDetection Calibration Server Proposal</span></b></a></li> <li><b><span class="external"><a href="file:///D:/helix-client/www/2005/devdocs/cayenne.html">Cayenne Summary Page</a><br> </span></b></li> </ul> <p><big><span style="font-weight: bold;">Contents</span> </big></p> <ol> <li><a href="https://client.dev.prognet.com/wiki.cgi/ConnectionBWComputation#head-2473e96bc614a911821242119918a241a41836d6">Introduction</a></li> <li><a href="https://client.dev.prognet.com/wiki.cgi/ConnectionBWComputation#head-c7f651900b6a36061a96a3873d60dd10a26fac39">Functional Flow</a></li> <li><a href="https://client.dev.prognet.com/wiki.cgi/ConnectionBWComputation#head-b7d4d9534a8af218ac4020b027ba7e8fabd40269">Dynamic ABD Samples</a></li> <li><a href="https://client.dev.prognet.com/wiki.cgi/ConnectionBWComputation#head-6faf12dcb9d83822e7fea78719af020e21389ffb">Back-to-Back Upshift BW Info</a></li> <li><a href="https://client.dev.prognet.com/wiki.cgi/ConnectionBWComputation#head-972d854843e84a5c1121ef548ab26e5f9f02e5f4">Dynamic ABD Samples stored in Smarter Networking</a></li> <li><a href="https://client.dev.prognet.com/wiki.cgi/ConnectionBWComputation#head-b18dddaf562a10afbcb2a50ba8ab15ee77c8a997">ABD Calibration value in Smarter Networking</a></li> <li><a href="https://client.dev.prognet.com/wiki.cgi/ConnectionBWComputation#head-10b2f2ceae39d7154af0f0e6af0dd78e398df586">ABD Calibration</a></li> <li><a href="https://client.dev.prognet.com/wiki.cgi/ConnectionBWComputation#head-52b4dc2963801e3b588ef303b67a38b612f05cec">Player Preferences</a></li> <li><a href="https://client.dev.prognet.com/wiki.cgi/ConnectionBWComputation#head-420feb0b32a50fdae325f8259cf43783bc790313">Wild Guess</a></li> <li><a href="https://client.dev.prognet.com/wiki.cgi/ConnectionBWComputation#head-f3f60044b06335eb6c4230e3c39f5e0218445878">Appendix</a></li> <ol> <li><a href="https://client.dev.prognet.com/wiki.cgi/ConnectionBWComputation#head-575ba0faf62aa5cc34ef031e5a8595d8d7078279">Explanation of Bandwidth and MaxBandwidth preferences</a></li> <li><a href="https://client.dev.prognet.com/wiki.cgi/ConnectionBWComputation#head-38a51a2dc29bbfeed3bec5fcd23c14f8e55b8b1c">Bandwidth setting effect on TurboPlay</a></li> </ol> </ol> <p><a name="head-2473e96bc614a911821242119918a241a41836d6"></a></p> <h1>1 Introduction</h1> This page describes the series of steps that the Client Core goes through to determine the connection BW. <p><a name="head-c7f651900b6a36061a96a3873d60dd10a26fac39"></a></p> <h1>2 Functional Flow</h1> <p>The connection BW is computed from a group of various BW data sources. These sources consist of the following:<br> </p> <ul> <li>Dynamic ABD samples </li> <li>Back-to-back packet upshift BW data </li> <li>Dynamic ABD samples stored in the Smarter Networking code </li> <li>ABD calibration samples in Smarter Networking </li> <li>ABD Calibration</li> <li>Various player preferences</li> </ul> <p>These sources have been listed in the order of importance. If the most important source, Dynamic ABD samples, is not available then the connection BW will be taken from the next source, back-to-back packet upshift BW data. This process continues down the list until one of the sources provides BW data. If none of the sources are available then a wild guess is made. <br> </p> <p>Once a candidate connection BW value is found, it is added to a 3 sample moving average. The final connection BW is the value of this moving average. The point of this moving average is to smooth out differences in the various bandwidth sources. It is quite possible that Smarter Networking values will be used for one clip, Dynamic ABD samples for the next, and maybe upshift BW info for the next. This moving average is meant to smooth out differences in these different methods for computing the connection BW. The number of samples used in this moving average may need to be increased if significant variations appear. Note that there is a trade off here between smoothness and responsiveness to actual changes in connection BW. </p> <p><a name="head-b7d4d9534a8af218ac4020b027ba7e8fabd40269"></a></p> <h1>3 Dynamic ABD Samples</h1> <p>Dynamic ABD samples are the most reliable source of connection BW data. These samples are collected from servers that support Dynamic ABD. The raw Dynamic ABD samples are passed through a 5 sample moving average to smooth out their values. The moving average data is not persistant across player instances. Everytime you run the player the moving average starts out empty. The moving average is persistent across playing multiple clips. <br> </p> <p>If multiple Dynamic ABD enabled servers are involved in a single presentation, the Dynamic ABD samples are all fed into the same moving average. Per server averages are not maintained. When a Dynamic ABD sample is received this sample is stored in the Smarter Networking object for this server. The Smarter networking code only keeps track of the most recently received sample. </p> <p><a name="head-6faf12dcb9d83822e7fea78719af020e21389ffb"></a></p> <h1>4 Back-to-Back Upshift BW Info</h1> <p>Back-to-Back packets are specially marked RDT packets that are sent one right after the other. This allows you to do bandwidth detection similar to what ABD does. This has historically been used to determine the available BW for upshifting a stream. The connection BW code takes advantage of this information if Dynamic ABD is not available. The back-to-back packet data is collected during RDT streaming over UDP. The raw data is passed through a 12 sample moving median filter to produce the upshift BW. The upshift BW value is not persistent across player instances. 12 back-to-back packet samples need to be received from a server before an upshift BW information is available. This means that when you start up the player you'll have to stream a clip before this information is available. </p> <p><a name="head-972d854843e84a5c1121ef548ab26e5f9f02e5f4"></a></p> <h1>5 Dynamic ABD Samples stored in Smarter Networking</h1> Whenever the player gets a Dynamic ABD sample for a host it stores that value of that sample in the Smarter Networking code. Smarter networking only keeps track of the most recent sample received from each host. This information is persistent across player instances. If these samples are needed to determine the connection bandwith, the samples for the hosts involved in the current presentation are fed into the 5 point moving average mentioned in the Dynamic ABD Samples section. The idea here is to treat them as if they were Dynamic ABD samples that actually came from the server. After the samples are added, the connection bandwidth is set to the value of the moving average. <p><a name="head-b18dddaf562a10afbcb2a50ba8ab15ee77c8a997"></a></p> <h1>6 ABD Calibration value in Smarter Networking</h1> When the client receives a ABD calibration result, it stores this value in the Smarter Networking code. Smarter networking only keeps track of the most recent calibration result. This value is persistant across player instances. <p><a name="head-10b2f2ceae39d7154af0f0e6af0dd78e398df586"></a></p> <h1>7 ABD Calibration</h1> The client can initiate an ABD calibration request to a stand-alone ABD server. This type of calibration is intended to be done very rarely, which is why it is so low in the list. When the ABD calibration result is received it stores the value in Smarter Networking so that it can be used later. <p><a name="head-52b4dc2963801e3b588ef303b67a38b612f05cec"></a></p> <h1>8 Player Preferences</h1> There are 2 player preferences that the player can use for determining the connection BW. The first one is the "<span style="font-weight: bold;">ConnectionBandwidth</span>" preference. This preference is set everytime the player successfully computes a connection BW. Since this value is stored in the preferences, it is persistent across player instances. If this preference is not present or equals 0 then the player will look for the "<span style="font-weight: bold;">Bandwidth</span>" preference. This is where the player has historically stored the user's connection bandwidth preference value. <p><a name="head-420feb0b32a50fdae325f8259cf43783bc790313"></a></p> <h1>9 Wild Guess</h1> If none of the methods above provide us with a connection BW then a wild guess of 40000 bps is assumed. There is nothing scientific about this value. It is just what the old ASM code used when it needed to make a wild guess. I'm sure it is basically assuming that we are on a 56k modem. <p><a name="head-f3f60044b06335eb6c4230e3c39f5e0218445878"></a></p> <h1>10 Appendix</h1> <p><a name="head-575ba0faf62aa5cc34ef031e5a8595d8d7078279"></a></p> <h2>10.1 Explanation of Bandwidth and MaxBandwidth preferences</h2> <pre class="code">From: "Henry Ping" <ping at real.com> <br>Date: Fri, 3 Jun 2005 11:29:42 <br> <br>"Bandwidth" and "MaxBandwidth" specify the range of bandwidth available for <br>playback, the client starts with "Bandwidth" for initial subscription, and <br>caps the aggregated subscribed bw after any upshift during the playback at <br>"MaxBandwidth". <br> <br> <br>BW_UI = BW desription in Player preference UI <br>BW_Value = BW value in registry(either "Bandwidth" or "MaxBandwidth") <br>BW_Avail = Adjusted based on BW_Value, this is the one actually used for BW <br>distribution <br>BW_Peak = Adjusted based on BW_Value, it's less conservative than BW_Avail, <br>it's used to cap the aggregated used BW after BW distribution for this <br>particular type of connection <br> <br> <br>BW_Description BW_Value(bps) BW_Avail(bps) BW__Peak(bps) <br>28.8Kbps 28800 21600 24480 <br>33.6Kbps 33600 25000 28560 <br>56.6Kbps 57600 50000 51840 <br>Single ISDN(64Kbps) 65536 56360 58980 <br>Dual ISDN(128Kbps) 115200 100000 104000 <br>DSL/Cable(256Kbps) 262200 BW_Value * 0.9 BW_Value * 0.91 <br>DSL/Cable(384Kbps) 393216 BW_Value * 0.9 BW_Value * 0.91 <br>DSL/Cable(512Kbps) 524300 BW_Value * 0.9 BW_Value * 0.91 <br>DSL/Cable(768Kbps) 786432 BW_Value * 0.9 BW_Value * 0.91 <br>T1(1.5Mbps) 1544000 BW_Value * 0.9 BW_Value * 0.91 <br>Office LAN(10Mbps and above) 10485800 BW_Value * 0.9 BW_Value * 0.91 <br> <br>Both "Bandwidth" and "MaxBandwidth" share the first 2 columns of the table <br>below, which simply maps the bw description displayed in UI to actual bw <br>value set in registry. <br> <br>For "Bandwidth", the client will further adjust&translate BW_Value to <br>BW_Avail and BW_Peak. BW_Avail & BW_Peak are the 2 values actually being <br>used, they are internally derived from BW_Value. <br> <br>For "MaxBandwidth", the client will use BW_Value as is. <br> <br>If BW_Value is not in the table shown above, then the following formula <br>will be used to calculate BW_Avail & BW_Peak: <br>if (BW_Value > 150000) <br>{ <br> BW_Avail = BW_Value * 0.90; <br> BW_Peak = BW_Value * 0.91; <br>} <br>else <br>{ <br> BW_Avail = BW_Value * 0.85; <br> BW_Peak = BW_Value * 0.90; <br>} <br></pre> <p><a name="head-38a51a2dc29bbfeed3bec5fcd23c14f8e55b8b1c"></a></p> <h2>10.2 Bandwidth setting effect on TurboPlay</h2> <ul> <li> <span class="nonexistent">TurboPlay</span> is capped by Bandwidth and is disabled when Bandwidth < 110000bps. </li> </ul> </body> </html> Index: ABD-SOD-001-AutoBwDetection.html =================================================================== RCS file: /cvsroot/helix-client/www/2005/devdocs/ABD-SOD-001-AutoBwDetection.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ABD-SOD-001-AutoBwDetection.html 23 Jul 2005 17:17:44 -0000 1.3 +++ ABD-SOD-001-AutoBwDetection.html 25 Jul 2005 17:08:14 -0000 1.4 @@ -15,7 +15,14 @@ </ul> <big style="font-weight: bold;">Related Pages</big><br> <ul> - <li><a href="cayenne.html">Cayenne Project Summary</a><br> + <li style="font-weight: bold;"><a href="cayenne.html">Cayenne Project +Summary</a></li> + <li style="font-weight: bold;"><a + href="ABD-SOD-002-ABDCalibration.html">ABD Calibration Server +Proposal</a></li> + <li><a style="font-weight: bold;" + href="ABD-SOD-003-ConnBWComputation.html">Connection Bandwidth +Computation</a><br> </li> </ul> <p><big><big><span style="font-weight: bold;">1. Introduction</span></big></big><br> @@ -207,68 +214,22 @@ </ul> <p> </p> <br> -<big>Misc.</big><br> +<big><big style="font-weight: bold;">4. Miscellaneous </big></big><br> <br> -<p>TCP:<br> +<p><big style="font-weight: bold;">4.1. TCP Bandwidth</big><br> The client ASM logic measures TCP bandwidth based on packet's latency instead of back-to-back packets, this is probably because we don't have control over the sending rate of TCP and TCP flow control can skew the back-to-back result. Some investigation needs to be done to find out more on this to decide whether we need separate mechansim for TCP. </p> -<p>Probing Packets:<br> +<p><big><span style="font-weight: bold;">4.2. Probing Packets</span></big><br> The probing packet size needs to be close to the actual data packet size the server sends at, depending on how many back-to-back packets required, we also don't want to eject too many intrusive large-size packets to the network. </p> -<br> -GET_PARAM response with <br> -"AutoBWDetection: 1" <br> -<br> -[probing packets] <br> -<br> -C -----------> S GET /cloak?ts=xxxx HTTP/1.0 <br> -SETUP request <br> -SET_PARAM request <br> -PLAY request with <br> -"Bandwidth=xxxx" <br> -<br> -<----------- HTTP/1.0 200 OK <br> -SETUP response <br> -SET_PARAM response <br> -PLAY response <br> -<br> -[data] -<p> </p> -If the client doesn't receive "Supported: ABD" in OPTIONS response, -then it knows the server doesn't support ABD and it switches to -scenario B as described in 3.2. If the client sends the GET_PARAM -request to initiate ABD, the transport is UDP and the client doesn't -receive back-to-back UDP packets within certain timeout period, then -the client will switch to TCP. <br> -<br> -Basically, we elevate client transport switch logic to SETUP response -from PLAY response. This could reduce startup time during transport -switching<>. In addition, we will use similar to smartER -networking -technique to cache the avaialble bandwidth of each playback in -order to reduce the noise from new ABD result. -<p> </p> -<big style="font-weight: bold;">3.2.1. TCP Bandwidth</big><br> -<br> -The client ASM logic measures TCP bandwidth based on packet's latency -instead of back-to-back packets, this is probably because we don't have -control over the sending rate of TCP and TCP flow control can skew the -back-to-back result. Some investigation needs to be done to find out -more on this to decide whether we need separate mechansim for TCP. -<p><big style="font-weight: bold;">3.2.2 Size of the packet </big><br> -</p> -The size needs to be close to the actual data packet size the server -sends at, depending on how many back-to-back packets required, we also -don't want to eject too many intrusive large-size packets to the -network. <p> </p> <br> </body> Index: cayenne.html =================================================================== RCS file: /cvsroot/helix-client/www/2005/devdocs/cayenne.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- cayenne.html 23 Jul 2005 06:41:00 -0000 1.6 +++ cayenne.html 25 Jul 2005 17:08:14 -0000 1.7 @@ -149,7 +149,7 @@ <li> <b>Start Date:</b> 18 May 2004 </li> <li> <b>End Date:</b> 14 Jan 2005 </li> <li> <b>Status:</b> Complete </li> - <li> <b>Responsible Engineer:</b> Aaron Colwell, Henry Ping </li> + <li> <b>Responsible Engineers:</b> Aaron Colwell, Henry Ping </li> </ul> <p><b>Documentation</b> <br> </p> @@ -157,8 +157,10 @@ <li> <a href="ABD-SOD-001-AutoBwDetection.html"><b>AutoBandwidthDetection ABD Specification and SOD</b></a> </li> <li> <a href="ABD-SOD-002-ABDCalibration.html"><b> <span - class="external">AutoBandwidthDetection Calibration Server Proposal</span></b></a> - </li> + class="external">AutoBandwidthDetection Calibration Server Proposal</span></b></a></li> + <li style="font-weight: bold;"><a + href="ABD-SOD-003-ConnBWComputation.html">Connection Bandwidth +Computation</a></li> </ul> <p><b>Description</b> <br> Automatic Bandwidth Detection will enable @@ -168,7 +170,6 @@ poor playback experiences. The feature is designed to interact directly with Seneca servers to determine optimal bandwidth settings in the client. <br> -<br> </p> <p>A stand-alone calibration server has been created for calibrating those clients interacting with non- or pre-Seneca servers. Index: ABD-SOD-002-ABDCalibration.html =================================================================== RCS file: /cvsroot/helix-client/www/2005/devdocs/ABD-SOD-002-ABDCalibration.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ABD-SOD-002-ABDCalibration.html 23 Jul 2005 17:17:44 -0000 1.2 +++ ABD-SOD-002-ABDCalibration.html 25 Jul 2005 17:08:14 -0000 1.3 @@ -15,8 +15,14 @@ </ul> <big style="font-weight: bold;">Related Pages</big><br> <ul> - <li><a href="cayenne.html">Cayenne Project Summary</a><br> - </li> + <li style="font-weight: bold;"><a href="cayenne.html">Cayenne Project +Summary</a></li> + <li><b><a + href="https://helix-client.helixcommunity.org/2005/devdocs/ABD-SOD-001-AutoBwDetection.html"><b>AutoBandwidthDetection +ABD Specification and SOD</b></a></b></li> + <li><b><b><a href="ABD-SOD-003-ConnBWComputation.html">Connection +Bandwidth Computation</a><br> + </b></b></li> </ul> <p><a name="head-f5cbdf6bfb51439be085b5c6b7460a7c91eabc3c"></a></p> <h1>1 Overview</h1> @@ -95,9 +101,7 @@ <li> <span class="nonexistent">AutoBwDetectionProbingSize</span> = Size (in bytes) [Min = 200, Max = 1500, default = 1200] </li> <li> <span class="nonexistent">AutoBwDetectionProbingPackets</span> -= Number of Packets to be sent [Min = 2, Max = 30, default = 2] </li> += Number of Packets to be sent [Min = 2, Max = 30, default = 2]</li> </ul> -fine ABD Version string, too, as part of -exchange </body> </html>