Question: correct usage of new zypper parallel download in Tumbleweed

After reading Benjamin Zeller’s mailing list post:

https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/thread/LOCZIG43MFJSTUIQ3VH2CRSYRCBNR4O7/#LOCZIG43MFJSTUIQ3VH2CRSYRCBNR4O7

and a Linuxiac article:

https://linuxiac.com/opensuses-zypper-package-manager-gets-an-exciting-new-feature/

I decided to have a go with the new zypper features. Whatever I did has resulted in blazing fast downloads :grin:, but I’d like to check to see if the steps I took were appropriate and/or necessary before repeating them on other Tumbleweed installations.

1) I edited /etc/zypp/zypp.conf to change:

# download.max_concurrent_connections = 5

to

download.max_concurrent_connections = 8

Would I still have had concurrent connections without removing the hash mark from this line?

2) I created a bash script to dup to new snapshots:

#!/bin/bash
sudo env ZYPP_CURL2=1 zypper ref
sudo env ZYPP_PCK_PRELOAD=1 zypper dup

Is there a better way to set both of these environment variables?

Yes. The text above this setting in zypp.conf describes that the standard setting is 5 concurrent connections. Only when you want to use another number, you have to uncomment (remove the hash) this line.

That is where I initially set mine in /etc/zypp/zypp.conf and there were no problems so I set it to 2x my cpu cores (12)

I set these in /root/.bashrc because root is the only one who can update

export ZYPP_PCK_PRELOAD=1
export ZYPP_CURL2=1

So when you “sudo” or “su” to a root shell they get loaded and then unloaded when you exit

1 Like

If you use the openSUSE-repos-Tumbleweed package (which provides a repo service), you don’t need to set any environment variables, as ZYPP_PCK_PRELOAD=1 and mediahandler=curl2 is enabled by default.

See official announcement

Users of openSUSE-repos on Tumblweed gained mediahandler=curl2 as part of the repository urls as well as preset ZYPP_PCK_PRELOAD=1 via /etc/profile.d/opensuse_repos.sh with the latest openSUSE-repos update.

Also have a look at the Youtube video linked in the official announcement, which explains exactly that.

1 Like

Ok … I missed that one … thank you :grinning:

I don’t have that file … apparently I’m a few hours behind on my updates … :laughing:

You need to have the package openSUSE-repos-Tumbleweed installed…as demonstrated in the video and written in the announcement.
And yes, you need an properly upgraded system or you may have not recieved/installed the updates which contain the features yet.

Not the problem. The package openSUSE-repos-Tumbleweed is not installed.

So now instead of this:

windeath:/home/dart # zypper lr
Repository priorities in effect:                                    (See 'zypper lr -P' for details)
      90 (raised priority)  :  1 repository
      99 (default priority) :  5 repositories

# | Alias                            | Name                      | Enabled | GPG Check | Refresh
--+----------------------------------+---------------------------+---------+-----------+--------
1 | brave-browser                    | Brave Browser             | Yes     | (r ) Yes  | Yes
2 | download.opensuse.org-non-oss    | Main Repository (NON-OSS) | Yes     | (r ) Yes  | Yes
3 | download.opensuse.org-oss        | Main Repository (Sources) | Yes     | (r ) Yes  | Yes
4 | download.opensuse.org-oss_1      | Main Repository (OSS)     | Yes     | (r ) Yes  | Yes
5 | download.opensuse.org-tumbleweed | Main Update Repository    | Yes     | (r ) Yes  | Yes
6 | packman-essentials               | packman-essentials        | Yes     | (r ) Yes  | Yes

I have this:

windeath:/home/dart # zypper lr
Repository priorities in effect:                                    (See 'zypper lr -P' for details)
      90 (raised priority)  :  1 repository
      99 (default priority) :  6 repositories

# | Alias                       | Name                  | Enabled | GPG Check | Refresh
--+-----------------------------+-----------------------+---------+-----------+--------
1 | brave-browser               | Brave Browser         | Yes     | (r ) Yes  | Yes
2 | download.opensuse.org-oss_1 | Main Repository (OSS) | Yes     | (r ) Yes  | Yes
3 | openSUSE:repo-non-oss       | repo-non-oss          | Yes     | ( p) Yes  | Yes
4 | openSUSE:repo-openh264      | repo-openh264         | Yes     | ( p) Yes  | Yes
5 | openSUSE:repo-oss           | repo-oss              | Yes     | ( p) Yes  | Yes
6 | openSUSE:repo-oss-debug     | repo-oss-debug        | No      | ----      | ----
7 | openSUSE:repo-oss-source    | repo-oss-source       | No      | ----      | ----
8 | openSUSE:update-tumbleweed  | update-tumbleweed     | Yes     | ( p) Yes  | Yes
9 | packman-essentials          | packman-essentials    | Yes     | (r ) Yes  | Yes

Ok ... I guess ... debug and source? Open264 might be nice

Just in case anyone is curious:

windeath:/home/dart # zypper in openSUSE-repos-Tumbleweed
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
  openSUSE-repos-Tumbleweed

1 new package to install.

Package download size:    18.5 KiB

Package install size change:
              |       1.2 KiB  required by packages that will be installed
     1.2 KiB  |  -      0 B    released by packages that will be removed

Backend:  classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y): 
Preloading: openSUSE-repos-Tumbleweed-20250324.7d1bc96-1.1.x86_64.rpm
Preloading: openSUSE-repos-Tumbleweed-20250324.7d1bc96-1.1.x86_64.rpm [done]
Preload finished. [success (18.5 KiB/s) ] ....................................................[done]
Retrieving: openSUSE-repos-Tumbleweed-20250324.7d1bc96-1.1.x86_64 (Main Repository (OSS))
                                                                                (1/1),  18.5 KiB    

Checking for file conflicts: .................................................................[done]
Content of download.opensuse.org-oss.repo will be newly managed by zypp-services.
Storing old copy as /etc/zypp/repos.d/download.opensuse.org-oss.repo.rpmsave
Content of download.opensuse.org-non-oss.repo will be newly managed by zypp-services.
Storing old copy as /etc/zypp/repos.d/download.opensuse.org-non-oss.repo.rpmsave
Content of download.opensuse.org-tumbleweed.repo will be newly managed by zypp-services.
Storing old copy as /etc/zypp/repos.d/download.opensuse.org-tumbleweed.repo.rpmsave
(1/1) Installing: openSUSE-repos-Tumbleweed-20250324.7d1bc96-1.1.x86_64 ......................[done]
%posttrans(openSUSE-repos-Tumbleweed-20250324.7d1bc96-1.1.x86_64) script output:
Adding service 'openSUSE'...
Service 'openSUSE' has been successfully added.
URI         : dir:/usr/share/zypp/local/service/openSUSE
Enabled     : Yes
Autorefresh : Yes
Refreshing service 'openSUSE'.
All services have been refreshed.
Running post-transaction scripts .............................................................[done]

Update worked fine and gained a little on my Unigine 3d benchmark so … :+1:

Do I install openSUSE-repos-Tumbleweed-NVIDIA instead if I have nvidia gpu?

openSUSE-repos-Tumbleweed-NVIDIA adds the Nvidia repo as can be seen in the package description.

openSUSE-repos-Tumbleweed - openSUSE package repositories

openSUSE-repos-Tumbleweed-NVIDIA - openSUSE NVIDIA repository definitions

1 Like

Okay so I need both thank you. I should have seen those package descriptions, my bad

If you install openSUSE-repos-Tumbleweed-NVIDIA it will automatically pull in openSUSE-repos-Tumbleweed. But not vice versa. If you do a fresh installation of Tumbleweed and the system detects Nvidia hardware, openSUSE-repos-Tumbleweed-NVIDIA gets installed automatically as a recommend.

On grown systems which have as example new-recommends disabled, package isntallation must be done manually.

The openSUSE-repos-xxxx packages already exist for some time and have many advantages for new users. But only Nvidia owners get the packages installed automatically to make the overall system experience better (correct drivers).

1 Like

Robust Upgrading - Create Transient Services

Issue the following commands in a root shell. They are spawned to the system.slice. All transactions are logged in the Journal.

Download:

systemd-run /usr/bin/bash -c "ZYPP_PCK_PRELOAD=1 zypper --non-interactive dist-upgrade --allow-arch-change --allow-downgrade --allow-name-change --allow-vendor-change --no-recommends --download-only"
3400g:~ # journalctl -b -u run-p1842-i1843.service --id systemd --no-pager
Apr 06 18:55:29 3400g systemd[1]: Started [systemd-run] /usr/bin/bash -c "ZYPP_PCK_PRELOAD=1 zypper --non-interactive dist-upgrade --allow-arch-change --allow-downgrade --allow-name-change --allow-vendor-change --no-recommends --download-only".
Apr 06 18:56:34 3400g systemd[1]: run-p1842-i1843.service: Deactivated successfully.
Apr 06 18:56:34 3400g systemd[1]: run-p1842-i1843.service: Consumed 10.851s CPU time.
3400g:~ # 

Install:

systemd-run /usr/bin/bash -c "ZYPP_PCK_PRELOAD=1 zypper --non-interactive dist-upgrade --allow-arch-change --allow-downgrade --allow-name-change --allow-vendor-change --no-recommends"
3400g:~ # journalctl -b -u run-p1915-i1916.service --id systemd --no-pager
Apr 06 19:00:29 3400g systemd[1]: Started [systemd-run] /usr/bin/bash -c "ZYPP_PCK_PRELOAD=1 zypper --non-interactive dist-upgrade --allow-arch-change --allow-downgrade --allow-name-change --allow-vendor-change --no-recommends".
Apr 06 19:02:25 3400g systemd[1]: run-p1915-i1916.service: Deactivated successfully.
Apr 06 19:02:25 3400g systemd[1]: run-p1915-i1916.service: Consumed 1min 38.138s CPU time.
3400g:~ # 

There are different ways to keep a Tumbleweed system upgraded. Everybody is free to choose the method which he/she wants. But the majority of experienced system administrators prefer to keep control over the upgrade process and their systems. This includes watching the factory mailing list, checking the list of the to be upgraded packages and make system adjustements if needed. Shifting the upgrade process of Tumbleweed into the background without possibility for interactions, is kind of loosing the control over your system.
But as noted above…everybody is free to maintain (or not) his/her system as liked…

1 Like

Thanks for the responses, one and all. I missed the official announcement.

So there is ‘more than one way to skin a cat,’ as the old idiomatic expression goes. I’ll experiment.

So, if I installed that package, only need issue sudo zypper dup?

Yes. You will see the result in the terminal output. There will be “preloading” written, and your download speed is maxed out (in most cases).