Performance issue of Cloudwatch output plugin #4317
Labels
area/aws
AWS plugins including cloudwatch, ecs, kinesis
performance
problems with decreased performance or enhancements that improve performance
Relevant telegraf.conf:
System info:
Telegraf v1.7.0 (git: release-1.7 f4d22dd)
Linux: Ubuntu 16.04
Kernel: 4.4.0-1022-aws
Steps to reproduce:
Expected behavior:
cloudwatch output plugin should not takes 4mins to send 1000 metrics
Actual behavior:
cloudwatch output plugin takes about 4mins to send 1000 metrics
Additional info:
Cloudwatch API has the abaility to send metrics in batch. And, cloudwatch output plugin also utilizes this to send multiple fields within one metrics. However, it still sends metrics one by one. If we have batch of 1000 metrics and each one only has one field, it would invoke PutMetricData() for 1000 times which is not efficient and also generates extra cost.
I think we should generate all cloudwatch.MetricDatum at once then we could partition them and send to Cloudwatch in batch. If this apporach is acceptable, I could help to PR it.
The text was updated successfully, but these errors were encountered: