Hi smart people,

If I have several computers on my home network and I have not set any explicit QoS rules on my router, how is bandwidth allocated? For example, if computer 1 is downloading a torrent at max speed and a second computer starts a download, how is the bandwidth allocation between the two determined? Thanks!

  • amigan
    link
    fedilink
    English
    20
    edit-2
    10 months ago

    There is no allocation if you haven’t configured any. Whoever can get their shit stuffed in the pipe first wins. From that point, any bottlenecks either FIFO to/from buffers, or if buffers fill up, just start taildropping. TCP (and other transport layer protocols like QUIC) implementations then have a sliding window algorithm that figures out the optimal amount of data to keep in flight at one time based on RTT and any packet loss caused by taildrops along the way.

      • amigan
        link
        fedilink
        English
        610 months ago

        UDP is hardly a transport layer protocol. It basically adds port numbers and checksum to IP. QUIC is usually described as transport layer since it provides flow/congestion control functionality usually ascribed to transport layer.

          • amigan
            link
            fedilink
            English
            110 months ago

            Sure, hence I said “hardly” rather than “is not.” None of this excludes QUIC from also being transport layer.

    • @zzzzOP
      link
      310 months ago

      I see. I think I understand some of that. Thank you.

      Before asking this question, I experienced a situation where I had a download going on computer 1 and then started a download on computer 2. Immediately, the download speed on computer 1 plummeted and the download rate of computer 2 increased to close to the max speed. This persisted until computer 2 finished, then computer 1’s speed picked back up. I was curious why the second download would have seemingly taken precedence.

      • @[email protected]
        link
        fedilink
        510 months ago

        Latency plays a big role in throughput. If one download target was ‘closer’, i.e. lower latency, it will be able to scale the windowsize higher, therefore allowing more data to flow through for a given connection. Imagine network packets are envelopes and data is paper. Not all envelopes can carry the same amount of paper for a given connection, and the more paper you stuff in your envelope, the faster the transfer completes.

      • amigan
        link
        fedilink
        English
        4
        edit-2
        10 months ago

        There are a lot of variables that could cause that situation. Were both machines on the same physical link (ethernet vs wifi)? Changes to their RTT could influence it. The only thing I could really add is that you have found the reason QoS mechanisms exist, lol.

        edit: I guess I can add this: if computer 1’s download was from a host that has longer total round trip latency than computer 2’s download, computer 2’s download will return ACKs quicker and thus get PSH packets with data quicker than computer 1. This will lead to it filling available bandwidth more easily.

        • @zzzzOP
          link
          410 months ago

          Yes, I think this must be it. Computer 1 was wifi while computer 2 was wired.

          • amigan
            link
            fedilink
            English
            4
            edit-2
            10 months ago

            Yeah. Wifi has more latency than switched ethernet on average (and really bad worst case latency since it is a shared medium, subject to neighboring RF interference that might not even be from the network, and radios try to handle retransmits on their own).