Skip to content

Commit 3b7424c

Browse files
committed
lower default concurrency factor to 4
I couldn't see a performance difference on newer kernels, faster on older ones, overall when not profiling I now do reliable 4GiB/s with peaks at 5GiB/s since moving from sha256. The single core performance is where the most improvement is seen, when hashing really big files it used to do it at 800MiB/s it now does it at 1.6GiB/s.
1 parent d511e1e commit 3b7424c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ func dedup(backoff chan struct{}, length uint64, paths ...string) {
326326
}
327327

328328
func main() {
329-
concurrencyFactor := flag.Int("cf", 16, "define the concurrency factor, this allows to set the amount of workers run per linux core, use GOMAXPROCS env to configure the number of cores used.")
329+
concurrencyFactor := flag.Int("cf", 4, "define the concurrency factor, this allows to set the amount of workers run per linux core, use GOMAXPROCS env to configure the number of cores used.")
330330
cpuprofile := flag.String("cpuprofile", "", "write cpu profile to `file`")
331331
onlyScan := flag.Bool("only-scan", false, "only scan and do not dedup")
332332
flag.Parse()

0 commit comments

Comments
 (0)