Skip to content

Envoy stats sink - flush time or max_bytes_per_datagram #28316

@javedsha

Description

@javedsha

Title: How Envoy flushes stats to stats sink?

Description:
I have a dogstatsdsink set up and the CPU utlization of envoy and the sink is going very high, due to which throughput to redis cluster is affected. Without the stats sink, everything works perfectly (as I expect the throughput and latency to be of redis calls)

Is there a way to set the stats flush time in envoy ?
Or what is the ideal value for max_bytes_per_datagram?

config:
"stats_config": {
"use_all_default_tags": "true",
"stats_tags": [
{
"tag_name": "custom_namespace",
"fixed_value": "ch"
}
]
},
"stats_sinks": [
{
"name": "envoy.stat_sinks.dog_statsd",
"typed_config": {
"@type": "type.googleapis.com/envoy.config.metrics.v3.DogStatsdSink",
"prefix": "envoy",
"address": {
"socket_address": {
"protocol": "UDP",
"address": "127.0.0.1",
"port_value": xxxx
}
}
}
}
]

We are running envoy with conncurency 4 (have tried all concurrency setting, but same issue always).

The stats agent is taking 120% CPU, and is a bottleneck for redis calls. Without the stats configuration above, our redis performance increases close to double.

[optional Relevant Links:]

Any extra documentation required to understand the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestions that are neither investigations, bugs, nor enhancementsstalestalebot believes this issue/PR has not been touched recently

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions