diff --git a/internal/gitclone/manager.go b/internal/gitclone/manager.go index 49d0ba7..790e5e3 100644 --- a/internal/gitclone/manager.go +++ b/internal/gitclone/manager.go @@ -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"}, } diff --git a/internal/jobscheduler/jobs.go b/internal/jobscheduler/jobs.go index 3db0e6c..501db28 100644 --- a/internal/jobscheduler/jobs.go +++ b/internal/jobscheduler/jobs.go @@ -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"` SchedulerDB string `hcl:"scheduler-db" help:"Path to the scheduler state database." default:"${CACHEW_STATE}/scheduler.db"` } diff --git a/internal/snapshot/snapshot.go b/internal/snapshot/snapshot.go index 2e8f5bb..58fa8da 100644 --- a/internal/snapshot/snapshot.go +++ b/internal/snapshot/snapshot.go @@ -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 { @@ -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