Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory grows slowly #551

Open
dxsup opened this issue Jul 27, 2023 · 4 comments
Open

Memory grows slowly #551

dxsup opened this issue Jul 27, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@dxsup
Copy link
Member

dxsup commented Jul 27, 2023

Describe the bug

The memory of the agent grows slowly.

Screenshots

The screenshot from a user shows that the memory usage of some agents is over 1GiB.
28131690442699_ pic

Trouble shooting
Run the following command:

curl http://IP:6060/debug/pprof/heap -o heap
go tool pprof heap
> web

We can get the following heap graph:
pprof001

It shows the inuse heap of kindling-collector is only 365MiB. So the kindling-probe may use more than 700MiB memory.

Environment (please complete the following information)

  • Kindling agent version: v0.8.0
  • Node Kernel version: 5.4.240-1.el7.elrepo.x86_64
@dxsup dxsup added the bug Something isn't working label Jul 27, 2023
@masterjyq
Copy link

Memory usage graph
image
Environment (please complete the following information)

  • Kindling agent version: v0.8.0
  • Node Kernel version: 4.19.90-17.ky10.x86_64

@masterjyq
Copy link

Memory usage graph image Environment (please complete the following information)

  • Kindling agent version: v0.8.0
  • Node Kernel version: 4.19.90-17.ky10.x86_64

After OOM
image

@xuchuan-666
Copy link

配置文件networkanalyzer.url_clustering_method改成blank,来降低指标数量后观察一天,agent服务内存还是一直上涨,并oom
1690508155673

@dxsup
Copy link
Member Author

dxsup commented Aug 24, 2023

目前已知指标kindling_trace_request_duration_nanoseconds的cardinality较高,该指标数量会持续增加导致探针内存持续升高。我们正在尝试降低指标持续堆积对内存的影响。

在该优化实现前,可以先通过将配置exporters.otelexporter.adapter_config.need_trace_as_metric修改为false关闭该指标,这样可以显著减缓内存上升的速度。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants