程序给一定压力跑稳定性3天,发现物理内存呈现坡度增长,平均1天10M左右。使用pprof工具检测如下:
Type: inuse_space
Time: Apr 8, 2019 at 5:27pm (CST)
Entering interactive mode (type "help" for commands, "o" for options)
(pprof) top
Showing nodes accounting for 22170kB, 100% of 22170kB total
Showing top 10 nodes out of 36
flat flat% sum% cum cum%
14336.66kB 64.67% 64.67% 14848.84kB 66.98% runtime.systemstack
2640.83kB 11.91% 76.58% 2640.83kB 11.91% bufio.NewWriterSize (inline)
2626.67kB 11.85% 88.43% 2626.67kB 11.85% bufio.NewReaderSize (inline)
516.01kB 2.33% 90.75% 516.01kB 2.33% bytes.makeSlice
513.31kB 2.32% 93.07% 513.31kB 2.32% vendor/golang.org/x/net/http2.(*Framer).WriteDataPadded
512.19kB 2.31% 95.38% 512.19kB 2.31% runtime.malg
512.19kB 2.31% 97.69% 5265.69kB 23.75% vendor/google.golang.org/grpc/transport.newHTTP2Client
512.14kB 2.31% 100% 512.14kB 2.31% encoding/json.(*decodeState).objectInterface
0 0% 100% 514kB 2.32% bufio.NewReader
0 0% 100% 516.01kB 2.33% bytes.(*Buffer).ReadFrom
查了很多信息都不知道runtime.systemstack的内存泄漏是怎么回事。有大神了解这个吗?
有疑问加站长微信联系(非本文作者)