From 508f8cbae07fa4cd1fa7672e295475f9a9a21ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Fri, 26 Apr 2024 17:15:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4KV=E7=9B=B8=E5=85=B3=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E5=B0=BA=E5=AF=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/utils/kvstore/store.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/utils/kvstore/store.go b/internal/utils/kvstore/store.go index 6eee28f..085c934 100644 --- a/internal/utils/kvstore/store.go +++ b/internal/utils/kvstore/store.go @@ -157,7 +157,11 @@ func (this *Store) Open() error { Logger: NewLogger(), } - var memoryMB = memutils.SystemMemoryGB() * 1 + if fsutils.DiskIsFast() { + opt.BytesPerSync = 1 << 20 + } + + var memoryMB = memutils.SystemMemoryGB() * 2 if memoryMB > 256 { memoryMB = 256 }