mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-24 02:59:16 +08:00
feat: 减少 badger 的内存占用 (#1216)
This commit is contained in:
parent
6abd313bd2
commit
d40b2734a9
16
backend/init/cache/cache.go
vendored
16
backend/init/cache/cache.go
vendored
@ -14,29 +14,29 @@ func Init() {
|
||||
options := badger.Options{
|
||||
Dir: c,
|
||||
ValueDir: c,
|
||||
ValueLogFileSize: 102400000,
|
||||
ValueLogMaxEntries: 100000,
|
||||
ValueLogFileSize: 64 << 20,
|
||||
ValueLogMaxEntries: 10 << 20,
|
||||
VLogPercentile: 0.1,
|
||||
|
||||
MemTableSize: 64 << 20,
|
||||
MemTableSize: 32 << 20,
|
||||
BaseTableSize: 2 << 20,
|
||||
BaseLevelSize: 10 << 20,
|
||||
TableSizeMultiplier: 2,
|
||||
LevelSizeMultiplier: 10,
|
||||
MaxLevels: 7,
|
||||
NumGoroutines: 8,
|
||||
NumGoroutines: 4,
|
||||
MetricsEnabled: true,
|
||||
NumCompactors: 4,
|
||||
NumCompactors: 2,
|
||||
NumLevelZeroTables: 5,
|
||||
NumLevelZeroTablesStall: 15,
|
||||
NumMemtables: 5,
|
||||
NumMemtables: 1,
|
||||
BloomFalsePositive: 0.01,
|
||||
BlockSize: 4 * 1024,
|
||||
BlockSize: 2 * 1024,
|
||||
SyncWrites: false,
|
||||
NumVersionsToKeep: 1,
|
||||
CompactL0OnClose: false,
|
||||
VerifyValueChecksum: false,
|
||||
BlockCacheSize: 256 << 20,
|
||||
BlockCacheSize: 32 << 20,
|
||||
IndexCacheSize: 0,
|
||||
ZSTDCompressionLevel: 1,
|
||||
EncryptionKey: []byte{},
|
||||
|
Loading…
Reference in New Issue
Block a user