mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-06 10:00:25 +08:00
取消IO保护
This commit is contained in:
@@ -65,7 +65,8 @@ var sharedWritingFileKeyLocker = sync.Mutex{}
|
|||||||
|
|
||||||
var maxOpenFiles = NewMaxOpenFiles()
|
var maxOpenFiles = NewMaxOpenFiles()
|
||||||
|
|
||||||
const maxOpenFilesSlowCost = 500 * time.Microsecond // 0.5ms
|
const maxOpenFilesSlowCost = 5000 * time.Microsecond // 0.5ms
|
||||||
|
const protectingLoadWhenDump = false
|
||||||
|
|
||||||
// FileStorage 文件缓存
|
// FileStorage 文件缓存
|
||||||
// 文件结构:
|
// 文件结构:
|
||||||
|
|||||||
@@ -438,6 +438,7 @@ func (this *MemoryStorage) startFlush() {
|
|||||||
if statCount == 100 {
|
if statCount == 100 {
|
||||||
statCount = 0
|
statCount = 0
|
||||||
|
|
||||||
|
if protectingLoadWhenDump {
|
||||||
loadStat, err := load.Avg()
|
loadStat, err := load.Avg()
|
||||||
if err == nil && loadStat != nil {
|
if err == nil && loadStat != nil {
|
||||||
if loadStat.Load1 > 10 {
|
if loadStat.Load1 > 10 {
|
||||||
@@ -451,6 +452,7 @@ func (this *MemoryStorage) startFlush() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.flushItem(hash)
|
this.flushItem(hash)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user