From 8a81a4ef681445cbf0484b306a622c02244c3bad Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Sun, 5 May 2024 22:12:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=8D=E6=AC=A1=E6=8F=90=E5=8D=87=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E9=BB=98=E8=AE=A4=E8=AF=BB=E5=86=99=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E6=95=B0=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/utils/fs/limiter.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/utils/fs/limiter.go b/internal/utils/fs/limiter.go index 818aeb3..76fb50e 100644 --- a/internal/utils/fs/limiter.go +++ b/internal/utils/fs/limiter.go @@ -8,8 +8,8 @@ import ( ) var maxThreads = runtime.NumCPU() -var WriterLimiter = NewLimiter(max(maxThreads*8, 16)) -var ReaderLimiter = NewLimiter(max(maxThreads*8, 16)) +var WriterLimiter = NewLimiter(max(maxThreads*16, 32)) +var ReaderLimiter = NewLimiter(max(maxThreads*16, 32)) type Limiter struct { threads chan struct{} @@ -19,8 +19,8 @@ type Limiter struct { } func NewLimiter(threads int) *Limiter { - if threads < 16 { - threads = 16 + if threads < 32 { + threads = 32 } if threads > 1024 { threads = 1024