Skip to content

Commit

Permalink
Remove pool goroutines from all components that don't need it (#4484)
Browse files Browse the repository at this point in the history
* cleanup

Signed-off-by: Joe Elliott <[email protected]>

* changelog

Signed-off-by: Joe Elliott <[email protected]>

* remove shutdown change

Signed-off-by: Joe Elliott <[email protected]>

* remove space

Signed-off-by: Joe Elliott <[email protected]>

---------

Signed-off-by: Joe Elliott <[email protected]>
  • Loading branch information
joe-elliott authored Jan 2, 2025
1 parent 51778c9 commit 472a16a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,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)
Expand Down
7 changes: 7 additions & 0 deletions cmd/tempo/app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 472a16a

Please sign in to comment.