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

feat: support the arg batch-size for small chunks mergence in nydus-image #124

Merged
merged 2 commits into from
May 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/driver/nydus/nydus.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ type Driver struct {
docker2oci bool
alignedChunk bool
chunkSize string
batchSize string
prefetchPatterns string
backend backend.Backend
platformMC platforms.MatchComparer
Expand Down Expand Up @@ -109,6 +110,7 @@ func New(cfg map[string]string, platformMC platforms.MatchComparer) (*Driver, er
}

fsChunkSize := cfg["fs_chunk_size"]
BatchSize := cfg["batch_size"]
prefetchPatterns := cfg["prefetch_patterns"]

fsVersion := cfg["fs_version"]
Expand Down Expand Up @@ -151,6 +153,7 @@ func New(cfg map[string]string, platformMC platforms.MatchComparer) (*Driver, er
docker2oci: docker2oci,
alignedChunk: fsAlignChunk,
chunkSize: fsChunkSize,
batchSize: BatchSize,
prefetchPatterns: prefetchPatterns,
backend: _backend,
platformMC: platformMC,
Expand Down Expand Up @@ -203,6 +206,7 @@ func (d *Driver) convert(ctx context.Context, provider accelcontent.Provider, so
OCIRef: d.ociRef,
AlignedChunk: d.alignedChunk,
ChunkSize: d.chunkSize,
BatchSize: d.batchSize,
}
mergeOpt := nydusify.MergeOption{
WorkDir: packOpt.WorkDir,
Expand Down