Prolong the period of computation of DB stats to approx 24 hours
This commit is contained in:
parent
ab3e1b6172
commit
e9f5dfdc54
@ -20,7 +20,6 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
// "github.com/erikdubbelboer/gspt"
|
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
"github.com/juju/errors"
|
"github.com/juju/errors"
|
||||||
)
|
)
|
||||||
@ -469,7 +468,7 @@ func storeInternalStateLoop() {
|
|||||||
var computeRunning bool
|
var computeRunning bool
|
||||||
lastCompute := time.Now()
|
lastCompute := time.Now()
|
||||||
// randomize the duration between ComputeInternalStateColumnStats to avoid peaks after reboot of machine with multiple blockbooks
|
// randomize the duration between ComputeInternalStateColumnStats to avoid peaks after reboot of machine with multiple blockbooks
|
||||||
computePeriod := 9*time.Hour + time.Duration(rand.Float64()*float64((2*time.Hour).Nanoseconds()))
|
computePeriod := 23*time.Hour + time.Duration(rand.Float64()*float64((4*time.Hour).Nanoseconds()))
|
||||||
lastAppInfo := time.Now()
|
lastAppInfo := time.Now()
|
||||||
logAppInfoPeriod := 15 * time.Minute
|
logAppInfoPeriod := 15 * time.Minute
|
||||||
glog.Info("storeInternalStateLoop starting with db stats recompute period ", computePeriod)
|
glog.Info("storeInternalStateLoop starting with db stats recompute period ", computePeriod)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user