Skip to content

Disable gRPC compression - #4429

Merged
joe-elliott merged 1 commit into
grafana:mainfrom
carles-grafana:disable-grpc-compression
Dec 9, 2024
Merged

Disable gRPC compression#4429
joe-elliott merged 1 commit into
grafana:mainfrom
carles-grafana:disable-grpc-compression

Conversation

@carles-grafana

@carles-grafana carles-grafana commented Dec 9, 2024

Copy link
Copy Markdown
Contributor

Our benchmark suggests that without compression, queriers and distributors use less CPU and memory.

This setting is configured at the client end.
That is, in the querier and in the ingester and metrics_generator clients of the distributor.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
Comment thread CHANGELOG.md Outdated
@@ -1,5 +1,6 @@
## main / unreleased
* [FEATURE] tempo-cli: support dropping multiple traces in a single operation [#4266](https://github.com/grafana/tempo/pull/4266) (@ndk)
* [CHANGE] Disable gRPC compression in the querier and distributor. [#4429] (https://github.com/grafana/tempo/pull/4429) (@carles-grafana)

@joe-elliott joe-elliott Dec 9, 2024

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add some more details here. Something like:

Disable gRPC compression in the querier and distributor for performance reasons.
If you would like to reenable we recommend snappy. Use the following settings:

querier:
  <whatever the path to the setting is>
distributor:
  <whatever the path to the setting is>
@joe-elliott

Copy link
Copy Markdown
Collaborator

Looks like there's a changelog conflict. Get that cleaned up and we'll merge!

Our benchmark suggests that without compression, queriers and distributors use less CPU and memory.

This setting is configured at the client end.
That is, in the querier and in the ingester and metrics_generator clients of the distributor.
Comment thread cmd/tempo/app/config.go
// Everything else
flagext.DefaultValues(&c.IngesterClient)
c.IngesterClient.GRPCClientConfig.GRPCCompression = "snappy"
c.IngesterClient.GRPCClientConfig.GRPCCompression = ""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: since this is changing the default values, let's update docs/sources/tempo/configuration/manifest.md as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm writing a script to generate it automatically and to the check it in CI. I will add it in another PR.

@joe-elliott
joe-elliott merged commit 2fff84a into grafana:main Dec 9, 2024
@vladst3f

Copy link
Copy Markdown

some before/after benchmarks would have been nice ! otherwise everyone is aware of the tradeoff.

@carles-grafana

carles-grafana commented Dec 13, 2024

Copy link
Copy Markdown
Contributor Author

some before/after benchmarks would have been nice ! otherwise everyone is aware of the tradeoff.

In our testing environment we've seen less CPU usage in queries that return a high number of series. Likewise, in our distributors we saw a significant drop after disabling compression.
image

mattdurham pushed a commit to mattdurham/tempo that referenced this pull request Jun 18, 2026
Our benchmark suggests that without compression, queriers and distributors use less CPU and memory.

This setting is configured at the client end.
That is, in the querier and in the ingester and metrics_generator clients of the distributor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants