Limit bandwidth when downloading background updates
When downloading updates in the background (in any plugin), it would be nice to set the connection priority or limit the service’s bandwidth, so that the system can give priority to foreground downloads (say, a video the user is watching). This would mean that background updates being downloaded doesn’t affect the overall desktop experience.
Either the download code in each plugin (flatpak, PackageKit, etc.) could be modified to limit the rate at which it recv()
s from its network buffer (quite a lot of invasive and complex changes).
Or the download code could be moved into a separate cgroup and a BPF filter program installed on the cgroup which performs basic rate limiting. (Unfortunately the simple NetClass=
option in systemd was removed as net_cls
was only available in cgroups v1.)
The second option would be better in the long term, and less invasive to implement, but is predicated on splitting background updates out of gnome-software into a daemon process. #942 is related.