Groups
Groups
Sign in
Groups
Groups
golang-nuts
Conversations
About
Send feedback
Help
How to reduce cpu usage when gc,nearly 100%
307 views
Skip to first unread message
林圣国
unread,
Nov 29, 2021, 9:45:03 PM
11/29/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
After running serveral of days,my program will use 100% cpu when gc,how can I fix this?
The program has millions of objects,hard to reduce.
go version
go version go1.16.3 linux/amd64
Top and perf top show that runtime gc causes high cpu usage
rule1129.heap
Ian Lance Taylor
unread,
Nov 29, 2021, 11:03:21 PM
11/29/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 林圣国, golang-nuts
Please always paste plain text as plain text, not as an image. Plain text is much easier to read. Thanks.
I recommend starting with
https://go.dev/blog/pprof
and the description of memory profiling.
Ian
林圣国
unread,
Nov 30, 2021, 1:50:12 AM
11/30/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Sorry about that,Google folds the image and the attachment,I already profile the memory heap.
Reply all
Reply to author
Forward
0 new messages