-
Notifications
You must be signed in to change notification settings - Fork 58
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
Side loading compressed layer files into the cacheDir #220
Comments
Sorry i mistagged the request. It is more of a question. |
@simha-db thanks for asking!
|
Ah ok. When is background download triggered?If there is no prefetch involved - do any of the ondemand loads go through background download? Some what off topic: If i use the ctr rpull --download-blobs - does that go through the cache? |
@simha-db background download starts 600s after container started by default, which can be set by
|
Thanks - And the background downloader fetches the full image to the snapshot directory? |
@simha-db Yes, exactly. |
Do all registry requests get logged in overlaybd-audit.log? One thing i notice is - if i prepull the entire image into registry_cache - pull image request to image service - which should be doing only rpull (without the download) takes much longer. When an image file is opened - if the layer files are in the registry_cache does the snapshotter do additional work to pull them to the snapshot directory or something of that sort? |
@simha-db all overlaybd registry requests (after rpull) will be logged in overlaybd-audit.log (background download audit is added in v0.6.9 #222). |
Turns out the time is the same - i incorrectly attributed it to an increase. |
I think i have some data on the slowness - maybe it is exposed when we upgraded our overlaybd - but here's what i observe.
the CRI pull image took close to 45 seconds.
|
@simha-db overlaybd-snapshotter will not try to find and validate files. There is a global lock in overlaybd-snapshotter, which makes prepare/mount layer running in serial. Usually prepare is quite fast for each layer, does it happens when there are many rpull requests and prepares are queueing, or disk io load is rather high ? |
Something doesn't add up - when all this activity is happening in overlaybd snapshotter - like this - containerd is still waiting for the image reference - there is no lazy load happening - what is all this activity in snapshotter? It seems to touch all the layer files one by one -does it setup the snapshot directory for all the registry cache layer files before the image reference is created?
|
@simha-db overlaybd-snapshotter indeed prepare snapshot directory for each image layer. snapshot directory contains some meta info for overlaybd-tcmu. |
What happened in your environment?
is side loading compressed layer files into the cacheDir supported?
I am looking into fetching the layer files out of band and saving them in the cacheDir as sha256:. Does overlaybd pickup the new files added externally to the directory after it has started? Or does it hydrate once and maintains the inventory internally until a restart?
What did you expect to happen?
I still see a few downloads happening - the logging wasn't verbose and didn't easily tell me which digest it was referring to - i will turn on debug logging and try again - but wanted to check if the above scenario is supposed to work.
How can we reproduce it?
copy the compressed layer files to the cacheDir after overlaybd has started - then start the container - expectation is overlaybd doesn't issue any blob download requests.
What is the version of your Overlaybd?
NA
What is your OS environment?
Ubuntu 18
Are you willing to submit PRs to fix it?
The text was updated successfully, but these errors were encountered: