调整KV相关选项尺寸

This commit is contained in:
GoEdgeLab
2024-04-26 17:15:55 +08:00
parent 1cf63ff17c
commit 086a9dd514

View File

@@ -157,7 +157,11 @@ func (this *Store) Open() error {
Logger: NewLogger(), Logger: NewLogger(),
} }
var memoryMB = memutils.SystemMemoryGB() * 1 if fsutils.DiskIsFast() {
opt.BytesPerSync = 1 << 20
}
var memoryMB = memutils.SystemMemoryGB() * 2
if memoryMB > 256 { if memoryMB > 256 {
memoryMB = 256 memoryMB = 256
} }