correcting for clock drift in utp and ledbat
play

correcting for clock drift in uTP and LEDBAT Arvid Norberg, - PowerPoint PPT Presentation

correcting for clock drift in uTP and LEDBAT Arvid Norberg, arvid@bittorrent.com Bram Cohen, bram@bittorrent.com A B x = now() x diff = now() - x f f i d base_delay = min(base_delay, diff) delay = diff - base_delay cwnd += (target -


  1. correcting for clock drift in uTP and LEDBAT Arvid Norberg, arvid@bittorrent.com Bram Cohen, bram@bittorrent.com

  2. A B x = now() x diff = now() - x f f i d base_delay = min(base_delay, diff) delay = diff - base_delay cwnd += (target - delay)· gain

  3. • using a base delay of the lowest ever received diff assumes that at least one packet will get through with no buffering delay • only ever adjusting base_delay downwards assumes no clock drift

  4. • One solution to clock drift is to update base_delay periodically with the lowest seen diff in the last period • What should the interval be? • If it’s too short, we’ll set the base delay to a sample that isn’t the true lowest value, and our measurements are unreliable • If it’s too long, we’ll allow a significant drift before adjusting, and our measurements are unreliable

  5. delay_base update interval too short delays are artificially kept too low for certain periods

  6. base_delay update interval too long 15 ms drift in 8 minutes

  7. • Tests show that the update interval cannot be less than around 10 minutes on our DSL line • Other tests on a LAN show a significant drift over 10 minutes • There is no good magic number for the base_delay update interval

  8. • However, if the clock drift is in your favor, it’s not a problem • Since the drift causes the delay measurements to appear smaller, the base_delay is updated with the drift

  9. • We can take advantage of this fact by keeping track of the other end’s delay as well as our own • Whenever the other end’s base_delay is adjusted downwards, we know it’s adjusting for drift and we can adjust our own base_delay the same amount upwards

  10. A B x = now() x y = now() diff = y - x y , f f i d base_delay = min(base_delay, diff) delay = diff - base_delay their_diff = now() - y if (their_diff < their_base_delay) { base_delay += their_base_delay - their_diff their_base_delay = their_diff }

  11. Delay measurement distribution. No drift correction target delay = 100 ms

  12. Delay measurement distribution. With drift correction target delay = 100 ms

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend