Skip to content

Tag search improvements#2164

Merged
mapno merged 5 commits intografana:mainfrom
mapno:tag-search-improvements
Mar 9, 2023
Merged

Tag search improvements#2164
mapno merged 5 commits intografana:mainfrom
mapno:tag-search-improvements

Conversation

@mapno
Copy link
Copy Markdown
Contributor

@mapno mapno commented Mar 3, 2023

What this PR does:

This PR contains a few fixes to tag search in vParquet.

  • Pass correct context to tag search func searchTagValues()
  • Search head block in SearchTagValuesV2
  • Take blocksMtx lock only once in SearchTagValuesV2
  • Don't cache parquet files for search

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copy link
Copy Markdown
Collaborator

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

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

Some other things we can try:

  • We pass common.DefaultSearchOptions() to all searches done on disk. this sets up reads of 1MB which is tuned for object storage. Parquet defaults to 4KB per read which is better tuned for disk access. Might be worth seeing what happens if leave the 4KB default. If you do this remember the potential issue with ReadRange() opening a file everytime!
  • wal is read synchronously and backend blocks are read async. if one is outperforming the other we could use that as a hint about what works best for performance on local disk ingester search.

I like the cleanup in this PR. Once you drop draft will give it a proper review.

Comment thread tempodb/encoding/vparquet/block_search.go Outdated
@mapno mapno marked this pull request as ready for review March 8, 2023 11:37
Copy link
Copy Markdown
Collaborator

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

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

lgtm. some good cleanup here.

does locking only once in SearchTagValuesV2 improve performance? or just simplifies code?

@mapno
Copy link
Copy Markdown
Contributor Author

mapno commented Mar 9, 2023

does locking only once in SearchTagValuesV2 improve performance? or just simplifies code?

Can't say for sure. Most of the improvements came after we stopped caching files. I think it's a nice improvement anyway.

@mapno mapno enabled auto-merge (squash) March 9, 2023 09:06
@mapno mapno merged commit fcfab37 into grafana:main Mar 9, 2023
@mapno mapno deleted the tag-search-improvements branch March 9, 2023 09:21
mdisibio pushed a commit to mdisibio/tempo that referenced this pull request Apr 18, 2023
* Tag search improvements

* Not reuse parquet files for search

* Changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants