Skip to content

xattr: support user.update-interval xattr for component stability#100

Merged
jlebon merged 4 commits intomainfrom
xattr-component
Apr 1, 2026
Merged

xattr: support user.update-interval xattr for component stability#100
jlebon merged 4 commits intomainfrom
xattr-component

Conversation

@jlebon
Copy link
Copy Markdown
Member

@jlebon jlebon commented Apr 1, 2026

Allow users to specify the stability of xattr components via user.update-interval. The value can be either a positive integer representing the average update interval in days (e.g. '30') or a named label (daily, weekly, biweekly, monthly, quarterly, yearly). That makes it easier to understand than having them plug in the probability directly.

This plugs a notable gap we've had so far in the xattr repo, which without this information was useful mostly when there was no to little packing pressure. As soon as aggressive packing is required, treating a high stability component as low can lead to suboptimal outcomes.

Closes: #98
Assisted-by: OpenCode (Claude Opus 4.6)

jlebon added 2 commits April 1, 2026 12:48
First, the Fedora minimal image is too tiny to get a good signal out of
benchmarking improvements.

Second, bump warmups to 3 since I've seen cases where 1 is not enough
to preload caches.

Third, redirect to a real file rather than `/dev/null` so it's closer to
how chunkah is actually used.
Compression impacts both the OCI archive itself and tar layers. It's
the same setting but the logging right now gives the impression that it
doesn't apply to the latter.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for the user.update-interval extended attribute, allowing users to specify component update frequencies (e.g., daily, weekly) to optimize the layer packing algorithm. The implementation includes parsing logic for named labels and integer days, stability probability calculation using a Poisson model, and conflict detection. Additionally, the pack_components function was refactored for better parameter passing, and comprehensive tests were added. Review feedback suggests refining the documentation regarding fallback stability behavior and refactoring repetitive setup logic in the new tests for better maintainability.

Comment thread README.md Outdated
Comment thread src/cmd_build.rs Outdated
jlebon added 2 commits April 1, 2026 14:48
Allow users to specify the stability of xattr components via
`user.update-interval`. The value can be either a positive integer
representing the average update interval in days (e.g. '30') or a
named label (daily, weekly, biweekly, monthly, quarterly, yearly). That
makes it easier to understand than having them plug in the probability
directly.

This plugs a notable gap we've had so far in the xattr repo, which
without this information was useful mostly when there was no to little
packing pressure. As soon as aggressive packing is required, treating a
high stability component as low can lead to suboptimal outcomes.

Closes: #98
Assisted-by: OpenCode (Claude Opus 4.6)
With xattrs now supporting stability, it's super easy to have a unit
test which exercises packing more from end-to-end.

Do this.

This at the same time tests the xattr stability feature itself.

Assisted-by: OpenCode (Claude Opus 4.6)
@jlebon jlebon force-pushed the xattr-component branch from f454718 to 46114c1 Compare April 1, 2026 19:18
@jlebon jlebon enabled auto-merge (rebase) April 1, 2026 19:18
@jlebon jlebon merged commit 56eb65b into main Apr 1, 2026
10 checks passed
@jlebon jlebon deleted the xattr-component branch April 1, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support providing stability for xattr components

1 participant