调整KV相关选项尺寸

This commit is contained in:
刘祥超
2024-04-26 17:15:55 +08:00
parent d8e4ff3d01
commit 508f8cbae0

View File

@@ -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
}