A question about go tool trace scheduler time

60 views
Skip to first unread message

zct

unread,
Jul 28, 2019, 1:00:43 AM7/28/19
to golang-nuts
The version of go i am use is 1.12
My server run in a docker which deploy in production environment which contains many machine . It is strange that the server occasionally behave like hang up in particular machine. so i use trace tool to analyze the performance, i  get this :

WX20190728-124119@2x.png





scheduler wait is longer than excepted, the sync wait maybe caused by the scheduler time. I want to which scopes can lead to the longer scheduler wait? OS scope ? Docker scope? code scope?

robert engels

unread,
Jul 28, 2019, 5:43:03 PM7/28/19
to zct, golang-nuts
goanalyzer might help you understand what is happening better. The schedule wait time looks high, but this time is dependent on the number of active (usually CPU bound) Go routines vs. GOMAXPROCS (which is usually limited by number of CPUs).



On Jul 27, 2019, at 11:47 PM, zct <90swor...@gmail.com> wrote:

The version of go i am use is 1.12
My server run in a docker which deploy in production environment which contains many machine . It is strange that the server occasionally behave like hang up in particular machine. so i use trace tool to analyze the performance, i  get this :

<WX201907...@2x.png>





scheduler wait is longer than excepted, the sync wait maybe caused by the scheduler time. I want to which scopes can lead to the longer scheduler wait? OS scope ? Docker scope? code scope?


--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/8d62ecdd-aed2-485e-b382-067b9078b44a%40googlegroups.com.
<WX201907...@2x.png>

robert engels

unread,
Jul 28, 2019, 5:48:40 PM7/28/19
to zct, golang-nuts
Also, based on the number of Go routine 4k, and the Go routine ID - you may be cycling through threads really rapidly, if the Go routines are using blocking calls that are spawning new threads - as these spin up you will increase the scheduler wait time.
Reply all
Reply to author
Forward
0 new messages