OPNsense Forum

English Forums => General Discussion => Topic started by: gctwnl on December 04, 2022, 11:45:59 pm

Title: Bandwidth: LAN devices get it first come, first served (can hog everything)?
Post by: gctwnl on December 04, 2022, 11:45:59 pm
I noticed the following (22.10 Business Edition): I have two laptops that are connected to the LAN and that I perform a speedtest on.

What happens is this: when the first one starts a bit earlier than the second one, the first one eats all the bandwidth. In other words, in my case: the first one goes up to close to 300Mbps, and the second one stays at 2-4Mbps until the first one finishes, then shoots up. If I start them (near) simultaneously, they both get roughly half of the available WAN bandwidth.

That makes the impression that if one user on the network is first, they can hog the entire bandwidth and the rest has no chance until they are done. Is that indeed the case? Or is there some rebalancing going on when the situation persists longer (speedtest is only 15 seconds)?
Title: Re: Bandwidth: LAN devices get it first come, first served (can hog everything)?
Post by: banana999 on December 05, 2022, 02:11:26 pm
I think that's how it works by default unless you set up explicit traffic shaping rules https://docs.opnsense.org/manual/shaping.html
Title: Re: Bandwidth: LAN devices get it first come, first served (can hog everything)?
Post by: gctwnl on December 05, 2022, 03:57:31 pm
Thank you. I'll look into traffic shaping later. It's not really a very serious issue most of the time, I think.
Title: Re: Bandwidth: LAN devices get it first come, first served (can hog everything)?
Post by: Patrick M. Hausen on December 05, 2022, 04:08:53 pm
Most connections are short-lived. So a single device using maximum peak bandwidth is normally not a problem.

TCP adjusts to the available bandwidth for optimum throughput. That's why when one device is using all capacity for a larger download, connections started later will startup using way less.

If you let both connections run for a while you should see a slow shift to a more balanced partition, IMHO.

HTH,
Patrick