Parallel zypper downloads are here

That thread showed a 2x-3x speedup on zypper. I guess that dude is already in Europe with plenty of fast mirrors. For me it increased average download speeds from 64KB/s to 20MB/s, which is more like a 200x-300x speed up, and seems to have saturated my internet connection, so possibly it could be even more of a performance boost for other people outside of EU with good internet.

This is HUGE. Highly recommend you give it a shot. I never really cared about slow downloads but I sure don’t mind them not being slow!

10 Likes

You have to enable it manually, right? Either way, I am happy that it has come around.

I’ve been using it in tech preview for a while - it is definitely a nice option to enable. (Edited to note: I’ve been using the one that this replaces, so will have to try this new one out).

I’ve also been using the tech preview of the single RPM transaction option, and that has also been really good for update speeds.

1 Like

Mileage heavily depends on the very connection. twtest, a sibling of IHE (Infamous Host Erlangen) was upgraded from Tumbleweed 20240514-0 → 20250303-0 using vendor defaults:

twtest:~ # inxi -SCM
System:
  Host: twtest Kernel: 6.13.5-1-default arch: x86_64 bits: 64
  Console: pty pts/0 Distro: openSUSE Tumbleweed 20250303
Machine:
  Type: Desktop Mobo: ASUSTeK model: PRIME B450-PLUS v: Rev X.0x serial: 201278343101133
    UEFI: American Megatrends v: 2409 date: 12/02/2020
CPU:
  Info: quad core model: AMD Ryzen 5 3400G with Radeon Vega Graphics bits: 64 type: MT MCP cache: L2: 2 MiB
  Speed (MHz): avg: 1400 min/max: 1400/3700 cores: 1: 1400 2: 1400 3: 1400 4: 1400 5: 1400 6: 1400 7: 1400 8: 1400
twtest:~ # 

Download time:

twtest:~ # journalctl -b -2 -u dup --identifier systemd
Mar 05 08:20:13 twtest systemd[1]: Starting Distribution Upgrade...
Mar 05 08:20:13 twtest systemd[1]: Started Distribution Upgrade.
Mar 05 08:33:41 twtest systemd[1]: dup.service: Consumed 1min 58.618s CPU time.
twtest:~ # 

2.41 GiB were downloaded in 807 seconds amounting to 25.7 Mb/s or very reasonable 51.3% of 50 Mb/s maximum speed.

Install time:

twtest:~ # journalctl -b -2 -u dup --identifier systemd
Mar 05 08:47:27 twtest systemd[1]: Starting Distribution Upgrade...
Mar 05 08:47:27 twtest systemd[1]: Started Distribution Upgrade.
Mar 05 09:03:45 twtest systemd[1]: dup.service: Deactivated successfully.
Mar 05 09:03:45 twtest systemd[1]: dup.service: Consumed 11min 12.507s CPU time.
twtest:~ # 

Users may want to check download speed percentage and consider changing the internet provider in case of poor performance.

Awesome :rocket:

Could you share your config and/or how you called zypper, I can’t seem to reproduce it on my end. :thinking:

My performance dropped, sure I’m doing something wrong :sob:

Normal run:

pavin@suse-pc:~> time zypper download postgresql virtualbox go mariadb ruby
Loading repository data...
Reading installed packages...
Retrieving: go-1.24-1.1.x86_64 (base-update)                                                                                                              (1/5),   8.5 KiB    
Retrieving: go-1.24-1.1.x86_64.rpm .........................................................................................................................[done (8.5 KiB/s)]
(1/5) /home/pavin/.cache/zypp/packages/base-update/x86_64/go-1.24-1.1.x86_64.rpm .......................................................................................[done]
Retrieving: mariadb-11.7.2-1.1.x86_64 (base-update)                                                                                                       (2/5),  22.5 MiB    
Retrieving: mariadb-11.7.2-1.1.x86_64.rpm ..................................................................................................................[done (1.7 MiB/s)]
(2/5) /home/pavin/.cache/zypp/packages/base-update/x86_64/mariadb-11.7.2-1.1.x86_64.rpm ................................................................................[done]
Retrieving: postgresql-17-2.3.noarch (base-oss)                                                                                                           (3/5),  12.4 KiB    
Retrieving: postgresql-17-2.3.noarch.rpm ...................................................................................................................[done (5.4 KiB/s)]
(3/5) /home/pavin/.cache/zypp/packages/base-oss/noarch/postgresql-17-2.3.noarch.rpm ....................................................................................[done]
Retrieving: ruby-3.4-1.1.x86_64 (base-oss)                                                                                                                (4/5),   8.1 KiB    
Retrieving: ruby-3.4-1.1.x86_64.rpm ....................................................................................................................................[done]
(4/5) /home/pavin/.cache/zypp/packages/base-oss/x86_64/ruby-3.4-1.1.x86_64.rpm .........................................................................................[done]
Retrieving: virtualbox-7.1.4-7.4.sr20250101.x86_64 (base-update)                                                                                          (5/5),  40.5 MiB    
Retrieving: virtualbox-7.1.4-7.4.sr20250101.x86_64.rpm .....................................................................................................[done (4.9 MiB/s)]
(5/5) /home/pavin/.cache/zypp/packages/base-update/x86_64/virtualbox-7.1.4-7.4.sr20250101.x86_64.rpm ...................................................................[done]

real	0m28.932s
user	0m3.679s
sys	0m1.037s

With new env vars:

pavin@suse-pc:~> time env ZYPP_CURL2=1 ZYPP_PCK_PRELOAD=1 zypper download postgresql virtualbox go mariadb ruby
Loading repository data...
Reading installed packages...
Retrieving: go-1.24-1.1.x86_64 (base-update)                                                                                                              (1/5),   8.5 KiB    
Retrieving: go-1.24-1.1.x86_64.rpm .........................................................................................................................[done (8.5 KiB/s)]
Retrieving: go-1.24-1.1.x86_64.rpm .........................................................................................................................[done (8.5 KiB/s)]
(1/5) /home/pavin/.cache/zypp/packages/base-update/x86_64/go-1.24-1.1.x86_64.rpm .......................................................................................[done]
Retrieving: mariadb-11.7.2-1.1.x86_64 (base-update)                                                                                                       (2/5),  22.5 MiB    
Retrieving: mariadb-11.7.2-1.1.x86_64.rpm ................................................................................................................[done (884.8 KiB/s)]
Retrieving: mariadb-11.7.2-1.1.x86_64.rpm ................................................................................................................[done (884.8 KiB/s)]
(2/5) /home/pavin/.cache/zypp/packages/base-update/x86_64/mariadb-11.7.2-1.1.x86_64.rpm ................................................................................[done]
Retrieving: postgresql-17-2.3.noarch (base-oss)                                                                                                           (3/5),  12.4 KiB    
Retrieving: postgresql-17-2.3.noarch.rpm ...................................................................................................................[done (9.4 KiB/s)]
Retrieving: postgresql-17-2.3.noarch.rpm ...................................................................................................................[done (9.4 KiB/s)]
(3/5) /home/pavin/.cache/zypp/packages/base-oss/noarch/postgresql-17-2.3.noarch.rpm ....................................................................................[done]
Retrieving: ruby-3.4-1.1.x86_64 (base-oss)                                                                                                                (4/5),   8.1 KiB    
Retrieving: ruby-3.4-1.1.x86_64.rpm ........................................................................................................................[done (1.2 KiB/s)]
Retrieving: ruby-3.4-1.1.x86_64.rpm ........................................................................................................................[done (1.2 KiB/s)]
(4/5) /home/pavin/.cache/zypp/packages/base-oss/x86_64/ruby-3.4-1.1.x86_64.rpm .........................................................................................[done]
Retrieving: virtualbox-7.1.4-7.4.sr20250101.x86_64 (base-update)                                                                                          (5/5),  40.5 MiB    
Retrieving: virtualbox-7.1.4-7.4.sr20250101.x86_64.rpm ...................................................................................................[done (679.1 KiB/s)]
Retrieving: virtualbox-7.1.4-7.4.sr20250101.x86_64.rpm ...................................................................................................[done (679.1 KiB/s)]
(5/5) /home/pavin/.cache/zypp/packages/base-update/x86_64/virtualbox-7.1.4-7.4.sr20250101.x86_64.rpm ...................................................................[done]

real	1m33.112s
user	0m3.836s
sys	0m1.106s

Repo config:

pavin@suse-pc:~> zypper lr -dEP
# | Alias             | Name               | Enabled | GPG Check | Refresh | Keep | Priority | Type   | URI                                                       | Service
--+-------------------+--------------------+---------+-----------+---------+------+----------+--------+-----------------------------------------------------------+--------
6 | base-update       | base-update        | Yes     | (r ) Yes  | Yes     | -    |   95     | rpm-md | https://cdn.opensuse.org/update/slowroll/repo/oss/        | 
2 | base-non-oss      | base-non-oss       | Yes     | (r ) Yes  | Yes     | -    |   99     | rpm-md | https://cdn.opensuse.org/slowroll/repo/non-oss/           | 
3 | base-openh264     | base-openh264      | Yes     | (r ) Yes  | Yes     | -    |   99     | rpm-md | https://codecs.opensuse.org/openh264/openSUSE_Tumbleweed/ | 
4 | base-oss          | base-oss           | Yes     | (r ) Yes  | Yes     | -    |   99     | rpm-md | https://cdn.opensuse.org/slowroll/repo/oss/               | 
7 | google-chrome     | google-chrome      | Yes     | (r ) Yes  | No      | -    |   99     | rpm-md | https://dl.google.com/linux/chrome/rpm/stable/x86_64      | 
8 | shiftkey-packages | GitHub Desktop     | Yes     | (r ) Yes  | No      | -    |   99     | rpm-md | https://rpm.packages.shiftkey.dev/rpm/                    | 
9 | vscode            | Visual Studio Code | Yes     | (r ) Yes  | No      | -    |   99     | rpm-md | https://packages.microsoft.com/yumrepos/vscode            | 

Turned out zypper download doesn’t yet support the parallel download feature.
Should’ve read the mailing list more carefully :face_holding_back_tears:

ZYPP_PCK_PRELOAD=1 works well with install and dup. 25% faster :rocket:

ZYPP_CURL2=1 has negative effect on refresh speeds for some reason :snail:

1 Like

Using just ZYPP_PCK_PRELOAD=1 without ZYPP_CURL2=1 yielded an impressive 100% performance improvement. :100:

Incredible! :dizzy:

1 Like

Download of texlive (1797 packages, 638.6 MiB) :

twtest:~ # journalctl -u run-p3421-i3721.service --identifier systemd
Mar 06 08:17:27 twtest systemd[1]: Started [systemd-run] /root/zypper-install.sh.
Mar 06 08:22:01 twtest systemd[1]: run-p3421-i3721.service: Deactivated successfully.
Mar 06 08:22:01 twtest systemd[1]: run-p3421-i3721.service: Consumed 31.397s CPU time.
twtest:~ # journalctl -u run-p5495-i5795.service --identifier systemd
Mar 06 08:26:28 twtest systemd[1]: Started [systemd-run] /root/zypper-install.sh.
Mar 06 08:28:16 twtest systemd[1]: run-p5495-i5795.service: Deactivated successfully.
Mar 06 08:28:16 twtest systemd[1]: run-p5495-i5795.service: Consumed 22.212s CPU time.
twtest:~ # 

Default: 266s, 20,14 Mb/s, 40,3% of rated speed
With preload: 108s, 49.6 Mb/s, 99,2% of rated speed

Improvement is indeed impressive.

1 Like

Tested downloading texlive on 200 Mbps connection and 200 ms latency to cdn.o.o, 1798 packages, 649.6 MiB:

  • Zypper with Preload: 5m13.371s
  • Zypper Default: 31m11.073s

6x performance improvement when number of packages increased, on high latency connection. :rocket:

ZYPP_PCK_PRELOAD=1 zypper dup

indeed shows an incredible performance boost

1 Like

Good to add this feature to KDE Plasma Software Updater for openSUSE Tumbleweed 🐧 as well, @alucardx!

This morning’s unattended upgrade of Infamous Host Erlangen:

Tumbleweed 20250307-0 -> 20250308-0

Package download size:    3.53 GiB
3430 packages to upgrade, 66 new, 2 to remove.

Download: Consumed 1min 20.711s CPU time
14min 4s download time.

Install: Consumed 8min 58.770s CPU time
12min 18s install time.
  • Connection Download Speed: 55.11 Mbit/s
  • zypper Download Speed: 35.92 Mbit/s

Zypper download speed is lower due to concurrent video downloads.

Comment here to say that the latest update (~5000 packages) was impressive fast!

So far I’m using this alias:

alias zup="sudo zypper ref && sudo env ZYPP_PCK_PRELOAD=1 zypper dup && flatpak update -y"

I’m wondering if in the future the env variable will still needed if I forgot to update the alias.

And BTW the full update went very smooth, without issues us usual.
Still impressed from Tumbleweed. Best Linux experience I ever had.

1 Like

sudo ZYPP_PCK_PRELOAD=1 zypper dup -l downloads fast but then fails for me with an error:

Preload finished. [files missing (14,5 MiB/s) ] 

and on next run downloads all the packages from scratch (at least progress indicator shows this) - so they are not cached.

It is a visual glitch. The packages get cached…at least on my local Tumbleweed machines.
The second attempt of ZYPP_PCK_PRELOAD=1 zypper dup only downloaded ~300 packages of ~2000 and afterwards the installation of all ~2000 packages startet.

Then good to fix this glitch as normal zypper dup shows packages are cached.

Report a bug please.

Yep, packages get properly cached. Verified by checking the relevant cache directory. Eg. for the OSS repo (replace OSS with your relevant repo alias/name)

/var/cache/zypp/packages/OSS/.preload/

A dist-upgrade a day keeps the trouble away. dup.service runs in the background in the system slice and thus is resistent to actions of unknowable users, who won’t bother with system upgrade:

erlangen:~ # systemctl cat dup.service 
# /etc/systemd/system/dup.service
[Unit]
Description=zypper dist-upgrade
After=purge-kernels.service btrbk.service

[Service]
Type=oneshot
Environment=ZYPP_PCK_PRELOAD=1
ExecStartPre=/usr/local/bin/check-opensuse
ExecStart=/usr/bin/zypper --non-interactive dist-upgrade

# /etc/systemd/system/service.d/toplevel-override.conf
[Unit]
OnFailure=failure-notification@%n
erlangen:~ # 

Hi, I am interested in setting this up for a very basic user who is using Tumbleweed on their machine.

  1. Do you have further information which I can reference for setting this dup.service up? It appears no custom script .sh file is required.
  2. This works well with Tumbleweed?
  3. If the user suspends or shuts off their machine when dup.service is running what happens and do problems arise?

Can you explain this a bit if possible?