mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00:00
app/vmselect/netstorage: document why runtime.Gosched() is removed at 28f054bb00
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3966
This commit is contained in:
parent
28f054bb00
commit
a1e496ced6
1 changed files with 5 additions and 0 deletions
|
@ -152,6 +152,11 @@ func timeseriesWorker(qt *querytracer.Tracer, workChs []chan *timeseriesWork, wo
|
||||||
idx := (i + workerID) % uint(len(workChs))
|
idx := (i + workerID) % uint(len(workChs))
|
||||||
ch := workChs[idx]
|
ch := workChs[idx]
|
||||||
for len(ch) > 0 {
|
for len(ch) > 0 {
|
||||||
|
// Do not call runtime.Gosched() here in order to give a chance
|
||||||
|
// the real owner of the work to complete it, since it consumes additional CPU
|
||||||
|
// and slows down the code on systems with big number of CPU cores.
|
||||||
|
// See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3966#issuecomment-1483208419
|
||||||
|
|
||||||
// It is expected that every channel in the workChs is already closed,
|
// It is expected that every channel in the workChs is already closed,
|
||||||
// so the next line should return immediately.
|
// so the next line should return immediately.
|
||||||
tsw, ok := <-ch
|
tsw, ok := <-ch
|
||||||
|
|
Loading…
Reference in a new issue