Skip to content

Parquet WAL Improvements: Multitenant envs#1945

Merged
joe-elliott merged 15 commits intografana:mainfrom
joe-elliott:writer-config
Dec 16, 2022
Merged

Parquet WAL Improvements: Multitenant envs#1945
joe-elliott merged 15 commits intografana:mainfrom
joe-elliott:writer-config

Conversation

@joe-elliott
Copy link
Copy Markdown
Collaborator

What this PR does:
A number of performance improvements for the Parquet wal that are particularly impactful in a highly multitenant environment:

  • shared writer schema
  • 1KB page buffer size for writers
  • don't load page index or bloom filters when opening a wal "page" file
  • lazy load wal "page" files

The real winners here were the 1k page buffer size and the lazy loading of the wal page files (instead of loading them immediately after flushing).

By default the page buffer size is 256KB. This page buffer is applied to every column of every tenant which adds up fast. Ideally there would be a way to specify per column page buffers, but this does not exist. The 1KB size does slow down tests. It doubles the length of time to run the tests in the /tempodb/wal folder for me, but in practice it seemed to have negligible impact on flush times in real environments.

Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Copy link
Copy Markdown
Contributor

@mdisibio mdisibio left a comment

Choose a reason for hiding this comment

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

Nice improvement. Left one question. Probably ok since tests are passing.

Comment thread tempodb/encoding/vparquet/wal_block.go
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
@joe-elliott
Copy link
Copy Markdown
Collaborator Author

This has been approved and tests are passing, but I'm holding on merging. Still investigating the behavior of some small changes.

Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
@joe-elliott
Copy link
Copy Markdown
Collaborator Author

Currently waiting on this PR: #1953 to prevent a performance regression in this branch.

@joe-elliott joe-elliott merged commit 81aa300 into grafana:main Dec 16, 2022
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