goiling golang runtime.systemstack

我有一个用go编写的网络应用程序.业务逻辑并不重要.
问题是我正在努力利用机器的全部功能
当我分析应用程序时,大部分时间都花在运行时的东西上.
似乎ALOT的时间花在runtime.systemstack下
我不明白它的含义或如何提高性能.
添加了相关慢执行方法的分析.
svg file
如果你进行了cpu profiling(go test -cpuprofile),issue 10609提到“运行时:由于systemstack,cpu profile无用”( fixed here,Go 1.5)

您可以使用最近的Go 1.10跟踪获得更有趣的视图:请参阅“Using Go 1.10 new trace features to debug an integration test

go test -trace trace.out
go tool trace -http=localhost:8080 trace.out

example here.您将清楚地看到每个处理器的不活动时间.

相关文章

什么是Go的接口? 接口可以说是一种类型,可以粗略的理解为他...
1、Golang指针 在介绍Golang指针隐式间接引用前,先简单说下...
1、概述 1.1 Protocol buffers定义 Protocol buffe...
判断文件是否存在,需要用到"os"包中的两个函数: os.Stat(...
1、编译环境 OS :Loongnix-Server Linux release 8.3 CPU指...
1、概述 Golang是一种强类型语言,虽然在代码中经常看到i:=1...