-
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
You can't get individual info for separate components, because k3s runs all the Kubernetes components - including the kubelet - in a single process. This is the entire value proposition of k3s and is covered in the docs. You can get it from agent in the same way you do on the server - by enabling pprof on the command line and hitting the pprof debug endpoint on the supervisor port. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your reply. I understand that I cannot directly obtain the pprof data for each component, but theoretically, the pprof data I obtained in the manner described should reflect the overall memory usage of k3s. However, the actual values are significantly lower than those reported by the 'top' command. Could you please explain what the data I access at /debug/pprof represents? |
Beta Was this translation helpful? Give feedback.
-
The standard golang profiling data: https://pkg.go.dev/net/http/pprof |
Beta Was this translation helpful? Give feedback.
-
Thank you for your response. What I meant may not be the explanation for how pprof obtains the data, but rather the explanation of pprof's data in k3s. I have the following configuration file on an idle k3s-server node:
I obtained memory usage through three different methods: My questions are: B. Based on the code related to /debug/pprof in “pkg/agent/run.go,” shouldn't the /debug/pprof method yield similar results to the "kubectl top nodes" method? |
Beta Was this translation helpful? Give feedback.
You can't get individual info for separate components, because k3s runs all the Kubernetes components - including the kubelet - in a single process. This is the entire value proposition of k3s and is covered in the docs.
You can get it from agent in the same way you do on the server - by enabling pprof on the command line and hitting the pprof debug endpoint on the supervisor port.