cmd/trace: give more context to "Scheduler wait" table column on /goroutine page #63430
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, this is present in the Go 1.21 series and in the development branch.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I ran the reproducer for #63422 and collected an execution trace. I used
go tool trace
to open a browser view, clicked the "Goroutine analysis" link, and clicked on one of the goroutine types (testing.tRunner
). I looked at the "Scheduler wait" column, and saw that one of the goroutines had spend a total of 84ms waiting to run.What did you expect to see?
I expected that figure to come with the relevant context: That goroutine played a role in executing 30,000 HTTP requests in sequence. It was scheduled a total of 60,035 times. Its average wait time was 1.4µs, and (if I've calculated correctly) its p99 wait time was 6.3µs, the p100 / worst case time was 532µs, and the second-worst was 82µs.
I think that table should have an additional column showing the number of times the goroutine has been scheduled (the count of GoStart events), "60035" in this case.
Following that, I also think that table should give some hints about the tail behavior of the goroutine's scheduler interactions. Maybe that's the p100 / worst case scheduling latency.
What did you see instead?
The table shows "84ms" of "Scheduler wait", without any of that additional context. That makes it look like the scheduler has problems, when a much closer look reveals that this is an especially chatty goroutine ... one that uses the scheduler perhaps a little too often, but which has a good experience nearly every time.
CC @golang/runtime , and @mknyszek in particular
The text was updated successfully, but these errors were encountered: