Skip to content

Update imgutil to improve containerd storage driver performance#2427

Merged
jjbustamante merged 2 commits intobuildpacks:mainfrom
jabrown85:jab/update-imgutil-containerd-perf
Aug 18, 2025
Merged

Update imgutil to improve containerd storage driver performance#2427
jjbustamante merged 2 commits intobuildpacks:mainfrom
jabrown85:jab/update-imgutil-containerd-perf

Conversation

@jabrown85
Copy link
Copy Markdown
Contributor

Summary

  • Always try the fast path first (omitting base layers) regardless of storage type. This greatly speeds up creating ephemeral builders in pack when it saves to the daemon.
  • Added log lines around ephemeral builder creation to help show time spent.

Output

Before

2025/08/14 10:01:40.472540 -> heroku/sbt@7.0.2
2025/08/14 10:01:40.691071 Using build cache volume pack-cache-library_gotest_latest-3e076e14826b.build

After

2025/08/14 10:01:40.472540 -> heroku/sbt@7.0.2
2025/08/14 10:01:40.485103 Builder creation completed, starting image save
2025/08/14 10:01:40.676990 Image save completed
2025/08/14 10:01:40.691071 Using build cache volume pack-cache-library_gotest_latest-3e076e14826b.build

Documentation

  • Should this change be documented?
    • Yes, see #___
    • No

Related

#2272

- Always try the fast path first (omitting base layers) regardless of storage type. This greatly speeds up creating ephemeral builders in pack when it saves to the daemon.
- Added log lines around ephemeral builder creation to help show time spent.

Signed-off-by: Jesse Brown <jabrown85@gmail.com>
@jabrown85 jabrown85 requested review from a team as code owners August 14, 2025 15:17
@github-actions github-actions Bot added this to the 0.39.0 milestone Aug 14, 2025
@github-actions github-actions Bot added type/enhancement Issue that requests a new feature or improvement. type/chore Issue that requests non-user facing changes. labels Aug 14, 2025

return b.image.Save(additionalTags...)
logger.Debugf("Builder creation completed, starting image save")
err = b.image.Save(additionalTags...)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we want to also track with debug logging when:

  • Saving a buildpack package
  • Saving the app image?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Or maybe we don't want these logger.Debugf and the PR is just an imageutil update, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was a very targeted improvement in logging so that if users see perf issues I can spot check that it is the save causing issues. Right now there is no log around here at all and you can't even tell what you are stuck waiting on.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Happy to pull it out and put up a different PR but figured I could combo it for efficiencies sake

Signed-off-by: Jesse Brown <jabrown85@gmail.com>
@jabrown85
Copy link
Copy Markdown
Contributor Author

@jjbustamante does these need anything else?

Copy link
Copy Markdown
Member

@jjbustamante jjbustamante left a comment

Choose a reason for hiding this comment

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

LGTM

@jjbustamante jjbustamante merged commit 58cb893 into buildpacks:main Aug 18, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/chore Issue that requests non-user facing changes. type/enhancement Issue that requests a new feature or improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants