-
Notifications
You must be signed in to change notification settings - Fork 211
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 direct use blob cache to run image #1436
Conversation
Ping @jiangliu |
765e342
to
f9151d8
Compare
Codecov Report
@@ Coverage Diff @@
## master #1436 +/- ##
==========================================
- Coverage 54.85% 54.74% -0.12%
==========================================
Files 123 124 +1
Lines 40477 40584 +107
Branches 40477 40584 +107
==========================================
+ Hits 22204 22217 +13
- Misses 17034 17130 +96
+ Partials 1239 1237 -2
|
f9151d8
to
18ba431
Compare
18ba431
to
efb1019
Compare
thanks, It has all been fixed, PTAL @jiangliu |
efb1019
to
74030f1
Compare
@@ -755,6 +756,9 @@ pub struct FileCacheConfig { | |||
/// Key for data encryption, a heximal representation of [u8; 32]. | |||
#[serde(default)] | |||
pub encryption_key: String, | |||
/// disbale chunk map, it is assumed that all data is ready | |||
#[serde(default)] | |||
pub disable_chunk_map: bool, |
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.
Is this option similar to disable_indexed_map
? And should we export the option to the user?
@@ -842,6 +846,9 @@ pub struct RafsConfigV2 { | |||
/// Filesystem prefetching configuration. | |||
#[serde(default)] | |||
pub prefetch: PrefetchConfigV2, | |||
// Only use cache, don't access the backend | |||
#[serde(default)] | |||
pub use_cache_only: bool, |
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.
The option should be put into the device.cache
?
49261a6
to
ae5e587
Compare
In localfs mode, we can directly generate blob cache through -blob-cache-dir, in this case, Nydusd can directly use blob cache to start, but it manages the state of chunk through ChunkMap by default, and by default all chunks are not ready, and will go to babckend to download, for which I introduced disable_chunk_map config, to turn off the ability of ChunkMap, by default make all chunks are ready, although Nydusd will still visit the backend to verify the validity of the blob when initializing the backend. it requires that the original nydus blob must exist, I introduced use_cache_only config to disable Nydusd access backend 1. add disable_chunk_map to disable ChunkMap func 2. add use_cache_only to disable nydusd access backend Signed-off-by: zyfjeff <[email protected]>
ae5e587
to
9efba9a
Compare
@@ -1260,6 +1267,9 @@ impl TryFrom<&BackendConfig> for BackendConfigV2 { | |||
"registry" => { | |||
config.registry = Some(serde_json::from_value(value.backend_config.clone())?); | |||
} | |||
"noop" => { |
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.
Why do you need noop
instead of using the localfs
backend? You can amend localfs
to work w/o the chunkmap. There is no need to introduce a new backend type for this IMO.
Maybe close the PR if no more usage, we can still reopen it if necessary. cc @zyfjeff |
Relevant Issue (if applicable)
#1415
#1414
Details
In localfs mode, we can directly generate blob cache through -blob-cache-dir, in this case, Nydusd can directly use blob cache to start, but it manages the state of chunk through ChunkMap by default, and by default all chunks are not ready, and will go to babckend to download, for which I introduced disable_chunk_map config, to turn off the ability of ChunkMap, by default make all chunks are ready, although Nydusd will still visit the backend to verify the validity of the blob when initializing the backend. it requires that the original nydus blob must exist, I introduced use_cache_only config to disable Nydusd access backend
Types of changes
Checklist