-
Notifications
You must be signed in to change notification settings - Fork 205
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
support generating separate blob for prefetched files #1629
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1629 +/- ##
==========================================
- Coverage 60.43% 60.10% -0.33%
==========================================
Files 146 147 +1
Lines 48841 49513 +672
Branches 46322 46994 +672
==========================================
+ Hits 29517 29760 +243
- Misses 17558 17971 +413
- Partials 1766 1782 +16
|
smoke/tests/native_layer_test.go
Outdated
@@ -81,6 +81,7 @@ func (n *NativeLayerTestSuite) TestMakeLayers() test.Generator { | |||
ctx.Runtime.RafsMode = scenario.GetString(paramRafsMode) | |||
ctx.Runtime.EnablePrefetch = scenario.GetBool(paramEnablePrefetch) | |||
ctx.Runtime.AmplifyIO = scenario.GetUInt64(paramAmplifyIO) | |||
ctx.Runtime.ChunkDedupDb = scenario.GetString(paramChunkDedupDb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like an unnecessary merge commit.
builder/src/chunkdict_generator.rs
Outdated
tree: &mut Tree, | ||
ctx: &mut BuildContext, | ||
bootstrap_mgr: &mut BootstrapManager, | ||
blobtable: &mut RafsV6BlobTable, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blob_table
, and need also to be compatible with RAFS v5.
7127c1e
to
a2a2478
Compare
We can statically analyze the image entrypoint dependency, or use runtime dynamic analysis technologies such as ebpf, fanotify, metric, etc. to obtain the container file access pattern, and then build this part of data into an independent image layer: * preferentially fetch blob during the image startup phase to reduce network and disk IO. * avoid frequent image builds, allows for better local cache utilization. Implement optimize subcommand to optimize image bootstrap from a prefetch file list, generate a new blob. ``` nydus-image optimize --prefetch-files /path/to/prefetch-files.txt \ --bootstrap /path/to/bootstrap \ --blob-dir /path/to/blobs ``` This will generate a new bootstrap and new blob in `blob-dir`. Signed-off-by: daiyongxuan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM!
Relevant Issue #1589
The objective is to create an independent image layer to prioritize the fetching of necessary blobs during startup, enhancing performance.
Details
This introduces the "optimize" subcommand, which generates a new blob containing prefetch files and creates a new RAFS format bootstrap. This ensures compatibility with the nydus-image check and optimizes the startup process.