Skip to content

Instantly share code, notes, and snippets.

@rootfs
Created April 12, 2023 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rootfs/2a74c58dcfec14efa6facc955153c2ac to your computer and use it in GitHub Desktop.
Save rootfs/2a74c58dcfec14efa6facc955153c2ac to your computer and use it in GitHub Desktop.

main branch 5b9c91af68c8644911e0955639750004e803c41f

(pprof) top20 -cum (all)
Active filters:
   focus=(all)
Showing nodes accounting for 1.13s, 61.75% of 1.83s total
Showing top 20 nodes out of 186
      flat  flat%   sum%        cum   cum%
     0.85s 46.45% 46.45%      0.85s 46.45%  runtime.cgocall
         0     0% 46.45%      0.82s 44.81%  github.com/iovisor/gobpf/bcc._Cfunc_bpf_module_create_c_from_string
         0     0% 46.45%      0.82s 44.81%  github.com/iovisor/gobpf/bcc.compile
         0     0% 46.45%      0.82s 44.81%  github.com/iovisor/gobpf/bcc.newModule
         0     0% 46.45%      0.82s 44.81%  github.com/iovisor/gobpf/bcc.newModule.func3
         0     0% 46.45%      0.40s 21.86%  github.com/sustainable-computing-io/kepler/pkg/collector.(*Collector).Update
         0     0% 46.45%      0.40s 21.86%  github.com/sustainable-computing-io/kepler/pkg/manager.(*CollectorManager).Start.func1
         0     0% 46.45%      0.25s 13.66%  github.com/containerd/cgroups/v3/cgroup2.(*Manager).Stat
         0     0% 46.45%      0.25s 13.66%  github.com/sustainable-computing-io/kepler/pkg/cgroup.CCgroupV12StatManager.SetCGroupStat
         0     0% 46.45%      0.25s 13.66%  github.com/sustainable-computing-io/kepler/pkg/collector.(*Collector).updateCgroupMetrics
         0     0% 46.45%      0.25s 13.66%  github.com/sustainable-computing-io/kepler/pkg/collector/metric.(*ContainerMetrics).UpdateCgroupMetrics
         0     0% 46.45%      0.14s  7.65%  github.com/containerd/cgroups/v3/cgroup2.readHugeTlbStats
     0.13s  7.10% 53.55%      0.14s  7.65%  syscall.Syscall
         0     0% 53.55%      0.13s  7.10%  github.com/sustainable-computing-io/kepler/pkg/collector.(*Collector).updateBPFMetrics
         0     0% 53.55%      0.12s  6.56%  os.(*File).readdir
     0.03s  1.64% 55.19%      0.12s  6.56%  runtime.mallocgc
         0     0% 55.19%      0.11s  6.01%  os.ReadFile
     0.11s  6.01% 61.20%      0.11s  6.01%  syscall.Syscall6
         0     0% 61.20%      0.10s  5.46%  runtime.mcall
     0.01s  0.55% 61.75%      0.10s  5.46%  runtime.schedule

up to 2b59dbd136e07aabf03db88e92e5a066346c69ad (before using containerd lib)

     (pprof) top20 -cum (all)
Active filters:
   focus=(all)
Showing nodes accounting for 0.91s, 62.76% of 1.45s total
Showing top 20 nodes out of 140
      flat  flat%   sum%        cum   cum%
     0.85s 58.62% 58.62%      0.85s 58.62%  runtime.cgocall
         0     0% 58.62%      0.81s 55.86%  github.com/iovisor/gobpf/bcc._Cfunc_bpf_module_create_c_from_string
         0     0% 58.62%      0.81s 55.86%  github.com/iovisor/gobpf/bcc.compile
         0     0% 58.62%      0.81s 55.86%  github.com/iovisor/gobpf/bcc.newModule
         0     0% 58.62%      0.81s 55.86%  github.com/iovisor/gobpf/bcc.newModule.func3
         0     0% 58.62%      0.16s 11.03%  github.com/sustainable-computing-io/kepler/pkg/collector.(*Collector).Update
         0     0% 58.62%      0.16s 11.03%  github.com/sustainable-computing-io/kepler/pkg/manager.(*CollectorManager).Start.func1
         0     0% 58.62%      0.08s  5.52%  github.com/sustainable-computing-io/kepler/pkg/collector.(*Collector).updateCgroupMetrics
         0     0% 58.62%      0.07s  4.83%  github.com/sustainable-computing-io/kepler/pkg/collector.(*Collector).updateBPFMetrics
     0.01s  0.69% 59.31%      0.07s  4.83%  runtime.mallocgc
         0     0% 59.31%      0.06s  4.14%  internal/poll.ignoringEINTRIO (inline)
     0.05s  3.45% 62.76%      0.06s  4.14%  syscall.Syscall
         0     0% 62.76%      0.05s  3.45%  github.com/sustainable-computing-io/kepler/pkg/cgroup.(*SliceHandler).GetStats
         0     0% 62.76%      0.05s  3.45%  github.com/sustainable-computing-io/kepler/pkg/cgroup.GetStandardStat
         0     0% 62.76%      0.05s  3.45%  os.Open (inline)
         0     0% 62.76%      0.05s  3.45%  os.OpenFile
         0     0% 62.76%      0.05s  3.45%  os.ReadFile
         0     0% 62.76%      0.05s  3.45%  os.openFileNolog
         0     0% 62.76%      0.05s  3.45%  runtime.makeslice
         0     0% 62.76%      0.04s  2.76%  github.com/iovisor/gobpf/bcc.(*Table).DeleteAll
         ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment