diff --git a/CHANGELOG.md b/CHANGELOG.md index d85ef145bde..fed0dc79c2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -92,6 +92,7 @@ querier: * [ENHANCEMENT] Update Azurite image. [#4298](https://github.com/grafana/tempo/pull/4464) (@javiermolinar) * [ENHANCEMENT] Update golang.org/x/crypto [#4474](https://github.com/grafana/tempo/pull/4474) (@javiermolinar) * [ENHANCEMENT] Distributor shim: add test verifying receiver works (including metrics) [#4477](https://github.com/grafana/tempo/pull/4477) (@yvrhdn) +* [ENHANCEMENT] Reduce goroutines in all non-querier components. [#4484](https://github.com/grafana/tempo/pull/4484) (@joe-elliott) * [BUGFIX] Handle invalid TraceQL query filter in tag values v2 disk cache [#4392](https://github.com/grafana/tempo/pull/4392) (@electron0zero) * [BUGFIX] Replace hedged requests roundtrips total with a counter. [#4063](https://github.com/grafana/tempo/pull/4063) [#4078](https://github.com/grafana/tempo/pull/4078) (@galalen) * [BUGFIX] Metrics generators: Correctly drop from the ring before stopping ingestion to reduce drops during a rollout. [#4101](https://github.com/grafana/tempo/pull/4101) (@joe-elliott) diff --git a/cmd/tempo/app/modules.go b/cmd/tempo/app/modules.go index 6652706d972..9b784e790d3 100644 --- a/cmd/tempo/app/modules.go +++ b/cmd/tempo/app/modules.go @@ -462,6 +462,13 @@ func (t *App) initOptionalStore() (services.Service, error) { } func (t *App) initStore() (services.Service, error) { + // the only component that needs a functioning tempodb pool are the queriers. all other components will just spin up + // hundreds of never used pool goroutines. set pool size to 0 here to avoid that. + if t.cfg.Target != Querier && t.cfg.Target != SingleBinary && t.cfg.Target != ScalableSingleBinary { + t.cfg.StorageConfig.Trace.Pool.MaxWorkers = 0 + t.cfg.StorageConfig.Trace.Pool.QueueDepth = 0 + } + store, err := tempo_storage.NewStore(t.cfg.StorageConfig, t.cacheProvider, log.Logger) if err != nil { return nil, fmt.Errorf("failed to create store: %w", err)