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

Optimize the seek of RocksDB iterators #438

Merged
merged 1 commit into from
Dec 30, 2021
Merged

Optimize the seek of RocksDB iterators #438

merged 1 commit into from
Dec 30, 2021

Conversation

shangxiaoxiong
Copy link
Member

@shangxiaoxiong shangxiaoxiong commented Dec 29, 2021

RocksDB iterator seek slows down dramatically when there are many large deleted rows. This slow down persists until a compaction occurs. To set read_options.iterate_upper_bound as tight as possible is recommended, so that internal iterating can stop sooner, rather than walking over the whole range of tombstones. Similarly, setting read_options.iterate_lower_bound for seekForPrev is recommended too.
Relevant RocksDB issue: facebook/rocksdb#5265

@ShooterIT ShooterIT requested a review from git-hulk December 30, 2021 07:15
@ShooterIT ShooterIT changed the title Optimize seek Optimize the seek of RocksDB iterators Dec 30, 2021
@ShooterIT ShooterIT merged commit a03f115 into apache:unstable Dec 30, 2021
ShooterIT pushed a commit to ShooterIT/kvrocks that referenced this pull request Jan 27, 2022
RocksDB iterator seek slows down dramatically when there are many large
deleted rows. This slow down persists until a compaction occurs.
To set read_options.iterate_upper_bound as tight as possible is recommended,
so that internal iterating can stop sooner, rather than walking over the whole
range of tombstones. Similarly, setting read_options.iterate_lower_bound for
seekForPrev is recommended too.

Relevant RocksDB issue: facebook/rocksdb#5265
@ShooterIT ShooterIT mentioned this pull request Jan 27, 2022
ShooterIT pushed a commit that referenced this pull request Jan 28, 2022
RocksDB iterator seek slows down dramatically when there are many large
deleted rows. This slow down persists until a compaction occurs.
To set read_options.iterate_upper_bound as tight as possible is recommended,
so that internal iterating can stop sooner, rather than walking over the whole
range of tombstones. Similarly, setting read_options.iterate_lower_bound for
seekForPrev is recommended too.

Relevant RocksDB issue: facebook/rocksdb#5265
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants