How to improve the Arch Linux package manager

Pacman is the package manager for Arch Linux. And out of the box, it’s just black and white, and single threaded all over. But, even if you’re one to tout “I use Arch btw.” and what it’s like living on the bleeding edge with it’s rolling release update…


This content originally appeared on DEV Community and was authored by Richard Halford

Pacman is the package manager for Arch Linux. And out of the box, it's just black and white, and single threaded all over. But, even if you're one to tout "I use Arch btw." and what it's like living on the bleeding edge with it's rolling release updates. You'll likely still want to make those updates take as little time as possible, with important information being colour highlighted.

Luckily pacman comes with a way to make both of these the case, with no more than an edit to it's configuration file.

Colour Output

To make sure pacman produces a colourful output in the terminal. Open up /etc/pacman.conf in your editor of choice, with sudo/doas privileges. Then simply delete the # before Color, under the # Misc options sub-heading.

  # Misc options
  #UseSyslog
- #Color
+ Color
  #TotalDownload
  CheckSpace
  #VerbosePkgLists

Now save and exit, and the next time you update your system packages, pacman will use the same colour scheme as your terminal/tty.

Multi-threaded Performance

With the release of Pacman v6.0.0, comes the ability to have parallel package downloads. Meaning all of your small system packages can be downloaded, all whilst getting the latest Linux kernel.

Because of reasons beyond the scope of this article (read: I don't feel like writing about it), this shouldn't throttle the speed of each download stream. As the Arch repository mirrors you're getting your package updates from, probably aren't sending packets of data to you as fast as your network connection can handle. Making parallel downloads only seem like a good thing. With resulting average install times that are less than just downloading package updates sequentially.

To add this latest feature, you will have to make the following edit, just like with the Color option mentioned above.

  # Misc options
  #UseSyslog
  Color
  #TotalDownload
  CheckSpace
  #VerbosePkgLists
+ ParallelDownloads = 5

If your install of Arch Linux comes after the release of Pacman v6.0.0, you should find that ParallelDownloads option is already there. And just needs to be 'un-commented'.

The number you assign to ParallelDownloads denotes how many download streams you want to enable. By default, this value is set equal to 5, but can be changed depending on your system's hardware. A rule of thumb being adopted seems to be to match the number of threads on your CPU. But, you may find that testing above this may be beneficial, without resulting in performance drops.

Originally published on xhalford.com


This content originally appeared on DEV Community and was authored by Richard Halford


Print Share Comment Cite Upload Translate Updates
APA

Richard Halford | Sciencx (2021-08-13T17:01:53+00:00) How to improve the Arch Linux package manager. Retrieved from https://www.scien.cx/2021/08/13/how-to-improve-the-arch-linux-package-manager/

MLA
" » How to improve the Arch Linux package manager." Richard Halford | Sciencx - Friday August 13, 2021, https://www.scien.cx/2021/08/13/how-to-improve-the-arch-linux-package-manager/
HARVARD
Richard Halford | Sciencx Friday August 13, 2021 » How to improve the Arch Linux package manager., viewed ,<https://www.scien.cx/2021/08/13/how-to-improve-the-arch-linux-package-manager/>
VANCOUVER
Richard Halford | Sciencx - » How to improve the Arch Linux package manager. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/13/how-to-improve-the-arch-linux-package-manager/
CHICAGO
" » How to improve the Arch Linux package manager." Richard Halford | Sciencx - Accessed . https://www.scien.cx/2021/08/13/how-to-improve-the-arch-linux-package-manager/
IEEE
" » How to improve the Arch Linux package manager." Richard Halford | Sciencx [Online]. Available: https://www.scien.cx/2021/08/13/how-to-improve-the-arch-linux-package-manager/. [Accessed: ]
rf:citation
» How to improve the Arch Linux package manager | Richard Halford | Sciencx | https://www.scien.cx/2021/08/13/how-to-improve-the-arch-linux-package-manager/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.