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

fill cache #1309

Merged
merged 2 commits into from
Nov 13, 2016
Merged

fill cache #1309

merged 2 commits into from
Nov 13, 2016

Conversation

zhangjinpeng87
Copy link
Member

@zhangjinpeng87 zhangjinpeng87 commented Nov 13, 2016

ref #1244
InnoDB use LRU list to cache pages, the LRU list is split into old list and new list two parts, when a page is read from disk, it will be added to the new list, when the page is readed again it will be moved to the old list, SQL like select * from t will just flush the new part of LRU, this will not decrease the cache hit rate a lot.
RocksDB use a LRU list to cache blocks, and use ReadOptions.fill_cache to control the behavior of fill cache or not. MyRocks has a session variable named skip_fill_cache, the default value is false, it means always fill cache, when user set skip_fill_cache=true(eg. dump the database), blocks will not fill cache.
Currently we fill cache just depend on the operation's type, if it is a scan operation we don't fill cache, and the otherwise we fill cache, this is too rough. We should support configure the behavior of fill cache or not by set session variable.

PTAL @siddontang @ngaut @BusyJay

@BusyJay
Copy link
Member

BusyJay commented Nov 13, 2016

LGTM

1 similar comment
@siddontang
Copy link
Contributor

LGTM

@zhangjinpeng87 zhangjinpeng87 merged commit 1050931 into master Nov 13, 2016
@zhangjinpeng87 zhangjinpeng87 deleted the zhangjinpeng/fill_cache_option branch November 13, 2016 05:37
mittalrishabh pushed a commit to mittalrishabh/tikv that referenced this pull request Nov 22, 2024
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0.
- [Commits](golang/net@v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

3 participants