Article View: linux.debian.bugs.dist
Article #5158Bug#97872: apt: download and install in parallel
From: Julian Andres Klode
Date: Thu, 19 Nov 2026 22:30
Date: Thu, 19 Nov 2026 22:30
59 lines
4486 bytes
4486 bytes
On Sat, Nov 07, 2026 at 03:27:16PM -0600, Enzo Abiye wrote: > Dear maintainers, > > I would like to add a measurement to this old wishlist report, and ask > which part of it, if any, is still considered worth pursuing. > > I wrote a small script that, for a given transaction, times the download of > all archives and then the sequential unpack with dpkg into a throw-away > root (no root privileges, nothing installed on the host). It does not > measure configure/maintainer scripts. One run on apt 3.3.3 / dpkg 1.23.11 > (Kali rolling), installing libreoffice-writer with --no-install-recommends, > over an ordinary home connection: > > packages: 51 > size: 97 MB > download: 262 s > unpack: 7 s > total: 269 s > upper bound on the gain from overlapping download and unpack: 3 % > > So on this link the download dominates and overlapping unpack with download > would save very little. This is a single run on one link; on a fast network > or with packages with long maintainer scripts the picture would differ, and > I can post more runs if useful. > > What the numbers do suggest is that, for slow links, the time is spent in > the fetch phase. I would therefore like to ask: > > 1. Is there still interest in the original request (unpack while > downloading), given that the benefit depends heavily on the link speed? > 2. Would better documentation and tuning of the per-host download behaviour > (Acquire::Queue-Mode, connections per host) be a more useful direction than > overlapping the two phases? > > I am happy to send more measurements, or a patch for whichever direction > you consider acceptable, as a merge request on Salsa. If you think this > report should simply be closed, that is fine too. > > Related reports: #55044. > > Thanks for your time and for maintaining apt. Given the recent vulnerability and the ongoing complexity of the download code, I am currently unwilling to explore this direction. It's worth pointing out that when downloads and installs are parallel, you need to split up the transaction into multiple smaller ones, each of which has additional overhead for triggers and such. For faster downloads I encourage using apt-transport-mirror with a set of 3+ mirrors so APT can download across the mirrors in parallel. For faster installs I'd encourage using a root file system with snapshots and adddingg force-unsafe-io in dpkg.cfg - dpkg spends a lot of time in fsync() in a furiatingly inefficient manner. -- debian developer - deb.li/jak | jak-linux.org - free software dev ubuntu core developer i speak de, en
Technical Details
Message-ID:
<O1iNI-cY5N-7@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomodReferences:
<O1iNI-cY5N-9@gated-at.bofh.it> <O1iNI-cY5N-11@gated-at.bofh.it> <O1iNI-cY5N-9@gated-at.bofh.it> <O1iNI-cY5N-11@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod From: Julian Andres Klode <jak@debian.org> Newsgroups: linux.debian.bugs.dist Subject: Bug#97872: apt: download and install in parallel Date: Thu, 19 Nov 2026 23:30:02 +0100 Message-ID: <O1iNI-cY5N-7@gated-at.bofh.it> References: <O1iNI-cY5N-9@gated-at.bofh.it> <O1iNI-cY5N-11@gated-at.bofh.it> <O1iNI-cY5N-9@gated-at.bofh.it> <O1iNI-cY5N-11@gated-at.bofh.it> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Thu Nov 19 22:25:07 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.7 Reply-To: Julian Andres Klode <jak@debian.org>, 97872@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: deity@lists.debian.org X-Debian-Pr-Message: followup 97872 X-Debian-Pr-Package: apt X-Debian-Pr-Source: apt Accept-Language: de-DE, de, en-GB, en-US, en MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Debian-User: jak X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2003632 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 59 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Thu, 19 Nov 2026 23:22:46 +0100 X-Original-Message-ID: <20261119231550.GA2944113@debian.org> X-Original-References: <Pine.LNX.4.21.0105180133040.1897-100000@merche233> <CALWk9LOgRynGHSDDj18b1hZN=XF+-Op9E5LJzarpsgepQCw8ug@mail.gmail.com> <Pine.LNX.4.21.0105180133040.1897-100000@merche233> <CALWk9LOgRynGHSDDj18b1hZN=XF+-Op9E5LJzarpsgepQCw8ug@mail.gmail.com>