Slashdot Mirror


Why BitTorrent Causes Latency and How To Fix It

Sivar recommends an article by George Ou examining why BitTorrent affects performance so much more than other types of file transfer and a recommendation on how to fix it. The suggestion is to modify P2P clients so that, at least on upload, they space their traffic evenly in time so that other applications have a chance to fit into the interstices. "[Any] VoIP [user] or online gamer who has a roommate or a family member who uses BitTorrent (or any P2P application) knows what a nightmare it is when BitTorrent is in use. The ping (round trip latency) goes through the roof and it stays there making VoIP packets drop out and game play impossible."

12 of 315 comments (clear)

  1. QoS? by Opportunist · · Score: 5, Funny

    Hey, I have a really spiffy idea. How about creating a router that can determine which packets take precedence? I'll make millions off that idea...

    What? Oh, damn Linux! What? Oh, Windows can do it too now? Why do I always have the good ideas about 10 years too late?

    --
    We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
    1. Re:QoS? by pin0chet · · Score: 5, Informative

      OpenWRT and Tomato feature impressive QoS capabilities as well.

      L7-filter can even manage traffic at the application layer. Just set Bittorrent to "Bulk" and put Skype and Xbox live as "Premium."

      Managing traffic on the router level is a lot easier than on the PC level, especially when you have several devices on a single network competing for scarce bandwidth.

    2. Re:QoS? by cgdiaz · · Score: 5, Insightful

      Well, since the article is about how to stop other users on the network from ruining your net experience, I think we assume they will be on a router of some sort.

    3. Re:QoS? by Donjo · · Score: 5, Funny

      Was it some guy from 127.0.0.1? I used Zone Alarm once and that guy was always trying to hack me. To bad I showed him, I made a batch file and pinged him thousands of times a second. Then my computer lagged so I stopped but I think I probably got him pretty good. /sarcasm

    4. Re:QoS? by schnipschnap · · Score: 5, Insightful

      You should have taken a quick look at the article first. The author basically experienced excessive lag even though he did cap his upload rate, compared to what an upload or download via a different protocol (FTP, HTTP, VoIP) would cause. This is because the BT client fires or receives packets whenever they are available, while the others receive or send packets in a spaced manner (unless they saturate the pipe). That means that even though your upload rate may be limited to 10 KB/s, if your total upload is 20 KB/s, you might experience a maximum lag of 0.5 seconds. The guy put up a lot of graphs to illustrate that it happens quite often actually. It seems that he got those patterns with the "official" client and with Azureus.

  2. Next on /. by this+great+guy · · Score: 5, Funny

    Why BitTorrent causes network bandwidth to be used. And network packets to be sent & received. Really sometimes I wonder.

  3. Re:My Roommate owes me 5000g by Midnight+Thunder · · Score: 5, Funny

    Do you know how many times I've died in WoW because of his porn downloading?

    As long as you haven't signed a contract with your roommate, then you could throttle him ;)

    --
    Jumpstart the tartan drive.
  4. Uh, yeah? by Anonymous Coward · · Score: 5, Insightful

    And we admit that on a small scale, we need to control our eating, but we don't want the grocery store telling us how much of things we can buy.

  5. Re:My Roommate owes me 5000g by Vectronic · · Score: 5, Funny

    "...then you could throttle him"

    eewww. he no doubt can handle that himself.

  6. Use randomized time rather than even spacing by karl.auerbach · · Score: 5, Informative

    We long ago learned that when inserting time between protocol events that it is far better to use a time randomized between an upper and lower bound than to use a repeating interval.

    When fixed repeating intervals are used, separate instances of a protocol (and other protocols that use repeating intervals) slowly tend to fall into lock-step patterns with pulsating waves of traffic in accord with those patterns.

    In other words, fixed protocol timers can create the traffic equivalent of the Tacoma Narrows bridge.

    By-the-way, ping (ICMP Echo request/reply) is a terrible way to measure network latency. ICMP is often a disfavored form of traffic as it crosses routers, sometimes even rate limited.

    There are better tools for measuring link properties, for example there is "pchar" - http://www.kitchenlab.org/www/bmah/Software/pchar/

    I worked on a method to do even better measurements, but I put it aside several years ago: Fast Path Characterization Protocol at http://www.cavebear.com/archive/fpcp/fpcp-sept-19-2000.html

  7. Re:Simpler solution by flerchin · · Score: 5, Insightful

    Read the bloody article. He shows that bittorent traffic capped to 10% of total bandwidth still causes more latency than an http download using 90% of the pipe. The total latency hit is small, but still significant for VOIP or high intensity gaming.

    --
    --why?
  8. Re:QoS, but only on the Telco Side by WhatAmIDoingHere · · Score: 5, Interesting

    I use between 50 and 80% of my max upload for torrents. I'm able to play TF2 and ping in the 20s. This article is addressing an issue that has been covered in every single "So, you want to use BitTorrent" article EVER.

    Hell, Azureus has a plugin to test ping an IP address/website, and if it takes longer than a set time, it slows down your uploads. uTorrent has a feature like that, as well.

    --
    Not a Twitter sockpuppet... but I wish I was.