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

Rdb_iterator_base::next_with_direction: too many compares for eof check #1438

Open
rockeet opened this issue Mar 13, 2024 · 2 comments
Open

Comments

@rockeet
Copy link
Contributor

rockeet commented Mar 13, 2024

in Rdb_iterator_base::next_with_direction, it checks prefix and lower bound and upper bound, this consuming too many cpu in our cases, when running tpcc, the flame graph showing these 3 compare takes up to 3% cpu time, which is ~10% of myrocks::Rdb_iterator_base::next_with_direction.

MyRocks use [Reverse]BytewiseComparator, so the optimal should be just 1 compare in scanning, I have tried to improve this way, it is ok in most cases but failed some mtr tests. I am expecting an official fix for this issue.

@luqun
Copy link
Contributor

luqun commented Mar 13, 2024

Thanks for reporting. if you are using new rocksdb version(>=8.8.0), then you can try to disable iterator bound check(rocksdb_check_iterate_bounds = 0);

@rockeet
Copy link
Contributor Author

rockeet commented Mar 15, 2024

Thanks for reporting. if you are using new rocksdb version(>=8.8.0), then you can try to disable iterator bound check(rocksdb_check_iterate_bounds = 0);

Very thanks!

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

No branches or pull requests

2 participants