0

Ever since I again switched to a Linux desktop, I noticed that while downloading a large file (say, in Chrome), normal browsing and any other network actions become essentially impossible because the download seems to be assigned virtually all available bandwidth without consideration for other processes.

On Windows, this is not a problem -- even while downloading large files (with virtually the same download speed), browsing remains totally fluid as Windows apparently prioritizes packets more intelligently.

Is there anything that can be done to fix this on Linux (preferably, easily)?

2
  • This isn't really a Linux problem... Sounds like you need a different browser or download manager to restrict the bandwidth used in downloads, more bandwidth (ie. you don't have enough for your usage), or more hardware resources (less likely). I have been using Linux since the mid-90's and never found this to be an issue.
    – acejavelin
    Jun 8, 2020 at 18:50
  • The desktop doesn't control what packets get sent on the wire to it or how those are queued. Any prioritization would have to take place elsewhere. Jun 8, 2020 at 19:22

2 Answers 2

0

I can't know if this answer will help you, but I'm not certain this is entirely due to the OS.

In case you ISP "maintains" a bufferbloat to get better download speeds "on the paper", you can try and limit it slightly with traffic shaping. The overall goal is to never have a buffer accumulate by your ISP (it could be at the home router or anywhere farther away) for outgoing traffic nor incoming traffic. That way interactive traffic doesn't have to wait too much in a long data queue. While this is fine for upload where your system emitting packets has total control (and can choose to delay or drop traffic if there's too much), results are not guaranteed for download since you're at the end of the buffer and actions can't have so direct results.

This involves Linux Traffic Control (using tc) which is very difficult to grasp. Having good overall network concepts is a prerequisite to use it manually. The download part is even more difficult to implement and requires setting up an Intermediate Functional Block virtual (and quasi-invisible) interface.

Fortunately there's a tool implemented in shell called wondershaper that is very simple to setup and handles everything. You have to know your bandwidth maximum download and upload (using various online speed tests) and provide it to wondershaper (to be run as root user or with sudo), for example (as provided by wondershaper -h, quite low) if your download is 1Mbits/s and upload 512Kbits/s:

wondershaper -a eth0 -d 1024 -u 512

There are additional tweaking options to favor some kind of traffic over other kinds.

If you take a packaged version, depending on your distribution, be careful. For example Debian (and thus Ubuntu) surprisingly still ships a version based upon 1.1a from original lartc.org, which was the last release there in 2002, and lacks features compared to the 1.2 - 1.4.1 fork.

There's probably better available, like using newer algorithms (fq_codel...) which wondershaper isn't doing yet.

some refs:

https://www.bufferbloat.net/projects/

https://www.bufferbloat.net/projects/bloat/wiki/What_can_I_do_about_Bufferbloat/

https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm

http://www.dslreports.com/speedtest (which includes latency results and should be checked before and after applying settings)

0

There's the tc command which configures Linux's QoS system, but it is extremely difficult to use.

What's not extremely difficult to use is the FireQoS utility - which is a frontend to tc and much easier to use. This can be installed with apt-get fireqos on a Debian or Debian-dervied system. You can then follow the tutorial here to set it up; the tutorial is pretty easy to follow and I follow it each time I set this up on a system.

To prevent the bufferbloat situation that @A.B mentions, set your incoming interface speed to slightly under your real incoming interface speed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .