Skip to content

Commit

Permalink
[] use 5% cache
Browse files Browse the repository at this point in the history
  • Loading branch information
hyunsooda committed Nov 15, 2023
1 parent 000a69d commit 91d6bbc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions storage/statedb/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,12 @@ func getTrieNodeCacheSizeMiB() int {
return 1 * 1024 // allocate 1G for small memory
}

memoryScalePercent := 0.3 // allocate 30% for 20 < mem < 100
if totalPhysicalMemMiB > 100*1024 {
memoryScalePercent = 0.35 // allocate 35% for 100 < mem
}

// memoryScalePercent := 0.3 // allocate 30% for 20 < mem < 100
// if totalPhysicalMemMiB > 100*1024 {
// memoryScalePercent = 0.35 // allocate 35% for 100 < mem
// }
memoryScalePercent := 0.05
fmt.Println("CACHE", int(totalPhysicalMemMiB*memoryScalePercent))
return int(totalPhysicalMemMiB * memoryScalePercent)
}

Expand Down

0 comments on commit 91d6bbc

Please sign in to comment.