Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion internal/gitclone/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ func mirrorConfigSettings() [][2]string {
// Disable auto GC
{"gc.auto", "0"},
// Pack performance
{"pack.threads", "0"},
{"pack.threads", "4"},
{"pack.deltaCacheSize", "512m"},
{"pack.windowMemory", "1g"},
}
Expand Down
2 changes: 1 addition & 1 deletion internal/jobscheduler/jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

type Config struct {
Concurrency int `hcl:"concurrency" help:"The maximum number of concurrent jobs to run (0 means number of cores)." default:"0"`
Concurrency int `hcl:"concurrency" help:"The maximum number of concurrent jobs to run (0 means number of cores)." default:"4"`
Copy link
Contributor Author

@nssherpa nssherpa Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this can go in the hcl if we don't want the default here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@nssherpa nssherpa Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In line 95 runtime.NumCPU() returns the total number of logical cores on the node vs the cores limited to the container, so I don't mind setting a non-zero default here.

SchedulerDB string `hcl:"scheduler-db" help:"Path to the scheduler state database." default:"${CACHEW_STATE}/scheduler.db"`
}

Expand Down
4 changes: 2 additions & 2 deletions internal/snapshot/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func Create(ctx context.Context, remote cache.Cache, key cache.Key, directory st
tarArgs = append(tarArgs, ".")

tarCmd := exec.CommandContext(ctx, "tar", tarArgs...)
zstdCmd := exec.CommandContext(ctx, "zstd", "-c", "-T0")
zstdCmd := exec.CommandContext(ctx, "zstd", "-c", "-T4")

tarStdout, err := tarCmd.StdoutPipe()
if err != nil {
Expand Down Expand Up @@ -102,7 +102,7 @@ func Restore(ctx context.Context, remote cache.Cache, key cache.Key, directory s
return errors.Wrap(err, "failed to create target directory")
}

zstdCmd := exec.CommandContext(ctx, "zstd", "-dc", "-T0")
zstdCmd := exec.CommandContext(ctx, "zstd", "-dc", "-T4")
tarCmd := exec.CommandContext(ctx, "tar", "-xpf", "-", "-C", directory)

zstdCmd.Stdin = rc
Expand Down