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

Avoid multiple in-memory copies of image layers during pull #67

Closed
wants to merge 1 commit into from
Closed

Avoid multiple in-memory copies of image layers during pull #67

wants to merge 1 commit into from

Conversation

anakrish
Copy link
Contributor

@anakrish anakrish commented Oct 24, 2022

New flow:
blob -> download to secure storage file -> optional decrypt to secure storage file -> optional decompress to secure storage file -> unpack to layer folder

With this PR, pulling docker.io/library/python:latest using a test image-rs program under heaptrack reports:

peak heap memory consumption:
53.2MB after 04.025s
peak RSS (including heaptrack overhead):
72.6MB
total memory leaked:
50.9MB (10.6kB suppressed)

fixes #66

Signed-off-by: Anand Krishnamoorthi [email protected]

New flow:
blob ->  download to secure storage file -> optional decrypt to secure storage file -> optional decompress to secure storage file -> unpack to layer folder

Signed-off-by: Anand Krishnamoorthi <[email protected]>
@anakrish
Copy link
Contributor Author

@arronwy Is this PR useful?

@arronwy
Copy link
Member

arronwy commented Nov 18, 2022

@arronwy Is this PR useful?

Hi @anakrish , sure, this PR is very nice to reduce memory consumption, the only concern is use a File cache the layers, it may have performance issue with extra write/read from disk, also in cloud scenario the storage backend may network base which have io rate limits.

@dcmiddle
Copy link
Member

I think this was eventually subsumed in https://github.com/confidential-containers/guest-components/pull/96/files.
Can we close this?
@anakrish @arronwy

@anakrish anakrish closed this by deleting the head repository Mar 11, 2024
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.

Multiple copies of image layers maintained in memory during image pull
3 participants