31

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!

top 14 comments
sorted by: hot top controversial new old
[-] theamigan@lemmy.dynatron.me 20 points 11 months ago* (last edited 11 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.

[-] PlexSheep@feddit.de 6 points 11 months ago

Note: QUIC is not really a transport layer protocol but uses UDP and builds atop of it.

[-] theamigan@lemmy.dynatron.me 6 points 11 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.

[-] PlexSheep@feddit.de 1 points 11 months ago

Sometimes port numbers is all you need

[-] theamigan@lemmy.dynatron.me 1 points 11 months ago

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

[-] zzzz@lemmy.world 3 points 11 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.

[-] noride@lemm.ee 5 points 11 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.

[-] theamigan@lemmy.dynatron.me 4 points 11 months ago* (last edited 11 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.

[-] zzzz@lemmy.world 4 points 11 months ago

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

[-] theamigan@lemmy.dynatron.me 4 points 11 months ago* (last edited 11 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).

[-] Sibbo@sopuli.xyz 6 points 11 months ago

Torrents open multiple connections with independent congestion control. If the second computer downloads from a single server at the same time, then it's gonna certainly lose against the torrent.

[-] ArbiterXero@lemmy.world 6 points 11 months ago

FIFO.

Torrents will fight to the death for bandwidth, so I’d limit them first.

[-] stinerman@midwest.social 2 points 11 months ago* (last edited 11 months ago)

If you want a really in-depth description, this article will give it to you. https://en.wikipedia.org/wiki/TCP_congestion_control

Your torrenting might not be using TCP, but the basic idea is the same.

TL;DR: the router uses some math and so forth to tell both computers to slow down to the point that it's not overloaded.

[-] zzzz@lemmy.world 0 points 11 months ago

Cool, thank you.

this post was submitted on 30 Nov 2023
31 points (97.0% liked)

No Stupid Questions

35810 readers
377 users here now

No such thing. Ask away!

!nostupidquestions is a community dedicated to being helpful and answering each others' questions on various topics.

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Rules (interactive)


Rule 1- All posts must be legitimate questions. All post titles must include a question.

All posts must be legitimate questions, and all post titles must include a question. Questions that are joke or trolling questions, memes, song lyrics as title, etc. are not allowed here. See Rule 6 for all exceptions.



Rule 2- Your question subject cannot be illegal or NSFW material.

Your question subject cannot be illegal or NSFW material. You will be warned first, banned second.



Rule 3- Do not seek mental, medical and professional help here.

Do not seek mental, medical and professional help here. Breaking this rule will not get you or your post removed, but it will put you at risk, and possibly in danger.



Rule 4- No self promotion or upvote-farming of any kind.

That's it.



Rule 5- No baiting or sealioning or promoting an agenda.

Questions which, instead of being of an innocuous nature, are specifically intended (based on reports and in the opinion of our crack moderation team) to bait users into ideological wars on charged political topics will be removed and the authors warned - or banned - depending on severity.



Rule 6- Regarding META posts and joke questions.

Provided it is about the community itself, you may post non-question posts using the [META] tag on your post title.

On fridays, you are allowed to post meme and troll questions, on the condition that it's in text format only, and conforms with our other rules. These posts MUST include the [NSQ Friday] tag in their title.

If you post a serious question on friday and are looking only for legitimate answers, then please include the [Serious] tag on your post. Irrelevant replies will then be removed by moderators.



Rule 7- You can't intentionally annoy, mock, or harass other members.

If you intentionally annoy, mock, harass, or discriminate against any individual member, you will be removed.

Likewise, if you are a member, sympathiser or a resemblant of a movement that is known to largely hate, mock, discriminate against, and/or want to take lives of a group of people, and you were provably vocal about your hate, then you will be banned on sight.



Rule 8- All comments should try to stay relevant to their parent content.



Rule 9- Reposts from other platforms are not allowed.

Let everyone have their own content.



Rule 10- Majority of bots aren't allowed to participate here.



Credits

Our breathtaking icon was bestowed upon us by @Cevilia!

The greatest banner of all time: by @TheOneWithTheHair!

founded 1 year ago
MODERATORS