From 5fda29a5802331c7087064c1c8c27a7733c72f41 Mon Sep 17 00:00:00 2001 From: Yota Toyama Date: Wed, 22 Nov 2017 11:56:16 +0900 Subject: [PATCH] Set default max concurrency based on maxOpenFiles --- arguments.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arguments.go b/arguments.go index 92b72a9..7c7d870 100644 --- a/arguments.go +++ b/arguments.go @@ -10,7 +10,7 @@ import ( ) var defaultConcurrency = func() int { - const max = 512 // Max number of open files is limited to 1024 on Linux. + const max = maxOpenFiles / 2 n := 8 * runtime.NumCPU() // 8 is an empirical value. if n < max {