You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
. This seemed strange to me because each metric should only be output to 1 output plugin. Indeed, when I move the Copy call over to the runningOutput.AddMetricafter the metric is filtered out by a filter, the amount of allocations drops drastically and performance increases. (this is a hack and should be implemented in a different way!)
I think it might be worth it to change this mechanism and only copy a metric when an output will accept a metric, i.e. it is not filtered by a Filter.
Relevant telegraf.conf
System info
Telegraf 1.31.2, Ubuntu 24.02
Docker
No response
Steps to reproduce
...
Expected behavior
Telegraf is able to keep up with the amount of data.
Actual behavior
Telegraf drops several of the UDP packets because it is waiting on GOGC.
I profiled Telegraf and noticed that about 28% of all allocations were done by the
metric.Copy
function called fromagent.runOutputs
attelegraf/agent/agent.go
Line 879 in ffee74c
runningOutput.AddMetric
after the metric is filtered out by a filter, the amount of allocations drops drastically and performance increases. (this is a hack and should be implemented in a different way!)I think it might be worth it to change this mechanism and only copy a metric when an output will accept a metric, i.e. it is not filtered by a Filter.
Additional info
heap
profile
profiles.zip
The text was updated successfully, but these errors were encountered: