Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mempurge garbage bytes ticker does not consider some value types or data written to blob files #9011

Open
CkTD opened this issue Oct 11, 2021 · 2 comments
Labels
bug Confirmed RocksDB bugs up-for-grabs Up for grabs

Comments

@CkTD
Copy link

CkTD commented Oct 11, 2021

rocksdb.memtable.garbage.bytes.at.flush is outdated bytes of data present on memtable at flush time.

It is calculated by total_payload_bytes - total_payload_bytes_written.

*memtable_garbage_bytes =

total_payload_bytes_written is the bytes writes to SSTs. When BlobDB is enabled , However, the values write to blob file will also be considered as garbage.

@ajkr ajkr added bug Confirmed RocksDB bugs up-for-grabs Up for grabs labels Oct 11, 2021
@ltamasi
Copy link
Contributor

ltamasi commented Oct 12, 2021

Seems to me there's more to this than the stats being off: mempurge jobs are not supposed to write blob files in the first place (in other words, large values are supposed to be extracted only by actual flush jobs).

@ltamasi ltamasi changed the title statistics rocksdb.memtable.garbage.bytes.at.flush is not correct for BlobDB Mempurge should avoid writing blob files Oct 12, 2021
@ltamasi
Copy link
Contributor

ltamasi commented Oct 18, 2021

Actually, I misread the code: there is no BlobFileBuilder in use in mempurge jobs, and the ticker @CkTD mentioned is incremented only in real flush jobs. So the underlying issue is related to the statistics, as originally reported. (There is actually a comment in the code mentioning this limitation: https://github.com/facebook/rocksdb/blob/main/db/builder.cc#L271-L272.) Sorry about the noise...

@ltamasi ltamasi changed the title Mempurge should avoid writing blob files Mempurge garbage bytes ticker does not consider some value types or data written to blob files Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed RocksDB bugs up-for-grabs Up for grabs
Projects
None yet
Development

No branches or pull requests

3 participants