mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-08 02:40:32 +08:00
调整缓存索引数据库缓存尺寸
This commit is contained in:
@@ -65,10 +65,10 @@ func (this *FileListDB) Open(dbPath string) error {
|
||||
this.dbPath = dbPath
|
||||
|
||||
// 动态调整Cache值
|
||||
var cacheSize = 32000
|
||||
var cacheSize = 512
|
||||
var memoryGB = utils.SystemMemoryGB()
|
||||
if memoryGB >= 8 {
|
||||
cacheSize += 32000 * memoryGB / 8
|
||||
if memoryGB >= 1 {
|
||||
cacheSize = 128 * memoryGB
|
||||
}
|
||||
|
||||
// write db
|
||||
|
||||
Reference in New Issue
Block a user