Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tune image publishing schedule #13294

Open
simondeziel opened this issue Apr 9, 2024 · 1 comment
Open

Tune image publishing schedule #13294

simondeziel opened this issue Apr 9, 2024 · 1 comment
Assignees
Labels
Imagebuilder Maybe Undecided whether in scope for the project

Comments

@simondeziel
Copy link
Member

AFAIK, LXD images are cached locally for a certain period of time and refreshed either on a schedule or on demand.
I think the refresh behaviour is to always pull the newest image available from the remote server.

Assuming that refresh behaviour of always pulling the newest image is accurate, I think we should stop publishing images on weekend days. Here's a practical use case:

  • User launches images:alpine/3.16 on Friday (LXD caches it locally)
  • User suspends laptop on Friday evening for the weekend
  • images:alpine/3.16 is rebuilt/republished Saturday, Sunday and Monday
  • User resumes laptop on Monday, launches another images:alpine/3.16
  • LXD tries to refresh the cached image but finds no vcdiff bridging Friday's cached image to Monday's. vcdiff only bridges yesterday's with today's images.
  • LXD pulls a full images:alpine/3.16 (slow)

I think most distros don't publish updates during weekends (Ubuntu doesn't publish updates from Friday to Sunday) so rebuilding/republishing those works against the local cache that LXD manages.

Taking the same scenario but assuming we only publish from Monday-Friday:

  • User launches images:alpine/3.16 on Friday (LXD caches it locally)
  • User suspends laptop on Friday evening for the weekend
  • images:alpine/3.16 is rebuilt/republished Monday
  • User resumes laptop on Monday, launches another images:alpine/3.16
  • LXD tries to refresh the cached image and finds a vcdiff bridging Friday's cached image to Monday's.
  • LXD pulls a full images:alpine/3.16 vcdiff (fast)

@MusicDin does that make sense?

@tomponline tomponline added the Maybe Undecided whether in scope for the project label Apr 9, 2024
@tomponline
Copy link
Member

It does make some sense. But I worry we may delay important updates by doing this.

I think this is a potential optimization we can look at a little later once we understand access patterns better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Imagebuilder Maybe Undecided whether in scope for the project
Projects
None yet
Development

No branches or pull requests

2 participants