mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
removed check for whether GOOS is openbsd
This commit is contained in:
parent
0ad014369e
commit
18065c4fdb
1 changed files with 10 additions and 12 deletions
|
|
@ -311,7 +311,6 @@ func prepare(ctx *cli.Context) {
|
||||||
ctx.GlobalSet(utils.CacheFlag.Name, strconv.Itoa(128))
|
ctx.GlobalSet(utils.CacheFlag.Name, strconv.Itoa(128))
|
||||||
}
|
}
|
||||||
// Cap the cache allowance and tune the garbage collector
|
// Cap the cache allowance and tune the garbage collector
|
||||||
if runtime.GOOS != "openbsd" {
|
|
||||||
mem, err := gopsutil.VirtualMemory()
|
mem, err := gopsutil.VirtualMemory()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if 32<<(^uintptr(0)>>63) == 32 && mem.Total > 2*1024*1024*1024 {
|
if 32<<(^uintptr(0)>>63) == 32 && mem.Total > 2*1024*1024*1024 {
|
||||||
|
|
@ -324,7 +323,6 @@ func prepare(ctx *cli.Context) {
|
||||||
ctx.GlobalSet(utils.CacheFlag.Name, strconv.Itoa(allowance))
|
ctx.GlobalSet(utils.CacheFlag.Name, strconv.Itoa(allowance))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Ensure Go's GC ignores the database cache for trigger percentage
|
// Ensure Go's GC ignores the database cache for trigger percentage
|
||||||
cache := ctx.GlobalInt(utils.CacheFlag.Name)
|
cache := ctx.GlobalInt(utils.CacheFlag.Name)
|
||||||
gogc := math.Max(20, math.Min(100, 100/(float64(cache)/1024)))
|
gogc := math.Max(20, math.Min(100, 100/(float64(cache)/1024)))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue