removed check for whether GOOS is openbsd

This commit is contained in:
renaynay 2020-05-07 16:06:17 +02:00
parent 0ad014369e
commit 18065c4fdb
No known key found for this signature in database
GPG key ID: 6557F5413D663EDB

View file

@ -311,7 +311,6 @@ func prepare(ctx *cli.Context) {
ctx.GlobalSet(utils.CacheFlag.Name, strconv.Itoa(128))
}
// Cap the cache allowance and tune the garbage collector
if runtime.GOOS != "openbsd" {
mem, err := gopsutil.VirtualMemory()
if err == nil {
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))
}
}
}
// Ensure Go's GC ignores the database cache for trigger percentage
cache := ctx.GlobalInt(utils.CacheFlag.Name)
gogc := math.Max(20, math.Min(100, 100/(float64(cache)/1024)))