Some things to reduce background bandwidth usage on a Fedora machine

September 11, 2021

Suppose, not entirely hypothetically, that you have a Fedora laptop and you want it to use minimal bandwidth for things that you don't specifically do. Unfortunately there are only a few things that I know of to do, and I'm not sure they're comprehensive. Most of my information comes from this old r/Fedora post.

First, turn off dnf-makecache. DNF's cache updates can apparently download significant amounts of data if you let them. Second, set your connection as metered in NetworkManager, which can be done with nmcli or through some but not all GUIs. In nmcli, it is:

nmcli connection modify <connection> connection.metered yes

The NetworkManager nm-connections-editor GUI allows you to set the metered state of connections. In Cinnamon's regular network desklet thing (which is not nm-applet but integrated into Cinnamon's shell), there is both a "Network Settings" and a "Network Connections" option. Only the latter runs nm-connections-editor and lets you set the metered option in a GUI.

Finally, according to the Reddit post, you can also disable Gnome PackageKit refreshes with:

gsettings set download-updates false

PackageKit and DNF may not be the only things in Cinnamon (or Gnome) that are probing for updates and so using up your limited bandwidth, but I haven't pinned down anything else yet. KDE probably has its own equivalent; XFCE is perhaps free of such annoyances.

In an ideal world, both DNF and PackageKit would take their cues from the connection being metered in NetworkManager. In this world, I'm not sure if they do (or if I trust them to really do this right). Turning them off entirely and doing manual refreshes on demand (which probably means "not at all while on a limited connection") is the easier and more definitely reliable way.

Simple network usage information can be extracted with 'ifconfig'. However, I believe those counters reset every time an interface comes and goes, which might happen more than you think if you move a machine around. As far as I know there's nothing in NetworkManager that keeps this information for NM "connections", which is usually the level you care about this on a laptop or other moving machine.

(I don't blame NetworkManager for this, since it's far from clear what stats people would be interested in and over what time ranges. I expect that NetworkManager developers are uninterested in a new sideline in a time series metrics database.)

Written on 11 September 2021.
« TLS Certificate Transparency logs come and go over time
How many Prometheus metrics a typical host here generates »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sat Sep 11 00:10:19 2021
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.