使用新的方法控制缓存并发写入速度

This commit is contained in:
GoEdgeLab
2023-07-29 09:29:36 +08:00
parent 079955b93e
commit 986ac733fd
12 changed files with 116 additions and 136 deletions

View File

@@ -488,10 +488,8 @@ func (this *MemoryStorage) startFlush() {
if err == nil && loadStat != nil {
if loadStat.Load1 > 10 {
writeDelayMS = 100
} else if loadStat.Load1 > 3 {
} else if loadStat.Load1 > 5 {
writeDelayMS = 50
} else if loadStat.Load1 > 2 {
writeDelayMS = 10
} else {
writeDelayMS = 0
}