Skip to content

[Ubuntu] Disable the DEP-11/AppStream apt index target - #14719

Open
v-dunjadenic wants to merge 1 commit into
actions:mainfrom
v-dunjadenic:ubuntu-disable-dep11-index-target
Open

v-dunjadenic wants to merge 1 commit into
actions:mainfrom
v-dunjadenic:ubuntu-disable-dep11-index-target

Conversation

@v-dunjadenic

Copy link
Copy Markdown
Contributor

Description

  • Disable the DEP-11/AppStream apt index target on ubuntu and ubuntu-slim.
  • Assert the effective value in Apt.Tests.ps1 and ubuntu-slim/test.sh.

Split out of #14643 so it can be validated separately from the retry and timeout work.

Reasoning:

DEP-11 is metadata for graphical software centres. A CI runner never reads it, but we download it on every apt-get update, where it is 15 of the roughly 51 index items and 7.6 MB. It is enabled only because appstream registers the target without DefaultEnabled, unlike its own icon targets.

It also helps with the stalls in #14594. Time-to-failover scales with the number of index items, since the mirror method restarts from priority:1 for every one of them, so this takes the worst case from about 26 minutes to about 19 on top of #14643. It is also the only part of this work that helps when a mirror is slow rather than dead, since timeouts cannot bound that case and fetching less is the only lever left.

The setting lives in /etc/apt/apt.conf.d/90-index-targets, which sorts after 50appstream so it wins.

Related issue:

#14594

Split from:

Check list

  • Related issue / work item is attached
  • Tests are written (if applicable)
  • Documentation is updated (if applicable)
  • Changes are tested and related VM images are successfully generated

- Skip DEP-11 metadata, which CI never uses, removing 15 of ~51 index items
  and 7.6 MB from every apt-get update.
- Assert the effective value in Apt.Tests.ps1 and ubuntu-slim/test.sh.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The reviewed changes include validation checks and no unresolved blocking issues were identified.

Pull request overview

This pull request disables unnecessary DEP-11/AppStream APT metadata downloads for Ubuntu and Ubuntu Slim images and adds validation checks.

Changes:

  • Adds APT index-target overrides for both image variants.
  • Verifies the effective APT configuration.
File summaries
File Description
images/ubuntu/scripts/tests/Apt.Tests.ps1 Verifies the effective APT setting.
images/ubuntu/scripts/build/configure-apt.sh Disables DEP-11 metadata downloads.
images/ubuntu-slim/test.sh Verifies the effective setting.
images/ubuntu-slim/scripts/build/configure-apt.sh Disables DEP-11 metadata downloads for Slim.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@v-dunjadenic

Copy link
Copy Markdown
Contributor Author

Worst case scenario calculations

DEP-11 changes only one variable, the number of index items apt fetches, from 51 to 36. Since time to failover is that count multiplied by the per item cost, the improvement is the same 1.4x whichever retry and timeout settings are in effect.

Case 1: Mirror unavailable

per item items total
before 127s 51 1h 48m
after 127s 36 1h 16m

On top of #14643, where the per item cost drops to 31s, the same reduction takes 26m down to 19m. Either way it is roughly 1.4x faster.

Case 2: Mirror slow but still sending data

This is the only change in the whole effort that helps here. Acquire::*::Timeout is an inactivity timer that every received byte resets, so against a mirror that is merely slow it never fires and no retry or failover happens. Fetching less is the only lever available.

index bytes at 204 kB/s
before 41.4 MB 3m 23s
after 33.8 MB 2m 46s

Roughly 1.2x faster. The 204 kB/s figure is the degraded metadata rate reported in #14594, against a median of about 6,900 kB/s.

Unlike the retry and timeout bounds in #14643, this applies to every image including 22.04 and 24.04 arm64, since it reduces work regardless of whether a mirror list is in use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants