Only wake up from waitDeps to trace when debugging #2176
+15
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a vertex is waiting on its dependencies, it blocks on those deps, but it also wakes up every 5 seconds in order to log what it's waiting for. Those logs are immediately discarded unless TRACE logs are enabled.
This is similar to #1810
I've pulled out the timer creation into a separate function which only conditionally creates the timer if debugging logs are enabled. This allows us to avoid creating/selecting on timers at all, which takes up 90% of the waitDeps on-CPU time (and puts additional pressure on the scheduler).
Grabbed some screenshots of perf difference against our (somewhat pathological) workload:
Profiling before (3.6s):
Profiling after (318ms):
Target Release
1.9.0
Checklist
Go checklist
Website/documentation checklist