strange perf sample when trying to understand the cause of high minor page fault

111 views
Skip to first unread message

Zhao Weng

unread,
May 9, 2024, 3:33:35 AMMay 9
to golang-nuts
Hi gophers,

We have a web service running with high minor page fault and I'm trying to understand why. I start by using linux perf:
```bash
sudo perf record -e minor-faults -c 1 -C 0-2 -ag -- sleep 15
sudo perf script > perf.out
```
and in the output file perf.out, I found many strange trace records:
```
tsproducer-prod 390772 [002] 2661398.756621:          1 minor-faults:
                  ea8a10 memcpy+0x24 (/usr/local/bin/tsproducer-prod)
```
and they are the majority of all records.
these records surprise me that it contains no stack trace between, seem like it's calling memcpy from nowhere, and i can not understand how this could happen base one my knowledge. I would expect something like "runtime.goexit.abi0" or "runtime.asmcgocall.abi0" before "memcpy".

By the way, this code is compiled using go 1.22.2
I should attach a flame graph generated base on perf.out.
please advise me on how to further understand this, maybe I miss some doc?

Thanks a lot, 
Zhao Weng
perf.svg
Reply all
Reply to author
Forward
0 new messages