Increase time spent pausing to 4sec
This commit is contained in:
parent
131f87afb1
commit
087d799547
@ -1380,8 +1380,10 @@ func (s *SplitStore) purge(coldr *ColdSetReader, checkpoint *Checkpoint, markSet
|
|||||||
// add some time slicing to the purge as this a very disk I/O heavy operation that
|
// add some time slicing to the purge as this a very disk I/O heavy operation that
|
||||||
// requires write access to txnLk that may starve other operations that require
|
// requires write access to txnLk that may starve other operations that require
|
||||||
// access to the blockstore.
|
// access to the blockstore.
|
||||||
if time.Since(now) > time.Second {
|
elapsed := time.Since(now)
|
||||||
time.Sleep(time.Second)
|
if elapsed > time.Second {
|
||||||
|
// work 1 second, sleep 4, or 20% utilization
|
||||||
|
time.Sleep(4 * elapsed)
|
||||||
now = time.Now()
|
now = time.Now()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user