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

This commit is contained in:
刘祥超
2023-07-29 09:29:36 +08:00
parent 3793d684fa
commit 33bb06fbc3
12 changed files with 116 additions and 136 deletions
+1 -3
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
}