Improving DNF Update Speeds with max_parallel_downloads
2024-10-12
364 words
2 mins read
When managing a Fedora or RHEL-based system, downloading updates can sometimes be time-consuming, especially when dealing with a slow network connection or multiple large packages or sometimes too many small packages 😀. By default, the DNF package manager downloads 1/3 package at a time, which can slow down the process. However, you can significantly improve download times by tweaking the max_parallel_downloads
setting.
What is max_parallel_downloads
?
max_parallel_downloads
is a configuration option in DNF that controls how many packages are downloaded simultaneously during system updates. By increasing the number of parallel downloads, you can take full advantage of your available network bandwidth and reduce the overall time needed for downloading updates.
Changing max_parallel_downloads
Setting
To adjust the number of parallel downloads, you’ll need to modify the DNF configuration file located at /etc/dnf/dnf.conf
.
-
Open the configuration file in your preferred text editor:
1
sudo nano /etc/dnf/dnf.conf
-
Look for the
[main]
section and add or modify the following line:1
max_parallel_downloads=10
This sets DNF to download up to 10 packages simultaneously. You can adjust the number based on your network speed and system performance.
-
Save the file and exit.
Testing the Performance Boost
After modifying the dnf.conf
file, you can run a system update to see the performance improvement:
|
|
During the download process, you should notice multiple packages being fetched simultaneously, reducing the total time spent waiting for updates.
Choosing the Right Number
While increasing the number of parallel downloads can speed up the process, setting the value too high may overwhelm your system’s resources or degrade performance on slower networks. It’s essential to find the optimal balance based on your system’s CPU, memory, and network speed.
- Slow connections: Try starting with 2-3 parallel downloads.
- Fast connections: You can increase the value to 10 or more.
You can experiment with different settings to see what works best for your environment.
Conclusion
By tweaking the max_parallel_downloads
setting in DNF, you can enhance your system’s performance during updates. This simple optimization allows you to better utilize your network bandwidth, making updates faster and more efficient.
If you haven’t already, give it a try the next time you’re running a system update, and enjoy the time saved!
Related Articles:
- 2022/04/02 Creating and using ackrc
- 2022/03/06 mussh-run-commands-on-multiple-hosts
- 2019/02/25 Gnome with i3 on Fedora 29
- 2018/10/01 image viewer tools
- 2018/09/10 systemctl enable and start service
Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.