Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP

Loading…

Prevent from block cache eviction by full table scan #68

Closed
yoshinorim opened this Issue · 1 comment

1 participant

@yoshinorim
Owner

RocksDB doesn't have midpoint insertion strategy, but has an option "ReadOptions.fill_cache = false" so that it does not insert blocks into block cache.
There are several choices for implementing this.

  • Adding session variable (i.e. rocksdb_not_fill_cache) and enable in mysqldump. This is probably the easiest to implement. It is hard to prevent ad-hoc queries but in practice it is good enough if disabling in mysqldump.
  • Adding a comment flag (i.e. SQL_NO_ROCKSDB_CACHE) and enable in mysqldump. This is harder than adding session variable because MySQL layer (sql_yacc) needs to be changed.
  • Making MyRocks smart enough to decide whether filling cache or not, by statistics (type=ALL and rows being large enough). This may cause issues when people intend to warm up cache.
@yoshinorim yoshinorim self-assigned this
@yoshinorim yoshinorim referenced this issue from a commit
@yoshinorim yoshinorim Prevent from block cache eviction by full table scan #68
Summary:
This diff adds a new session variable rocksdb_skip_fill_cache (default
false, and enabled at mysqldump), and set ReadOptions.fill_cache = false if turned on.
This avoids mysqldump filling block cache.

Test Plan: new test case mysqldump2

Reviewers: maykov, spetrunia, hermanlee4

Reviewed By: hermanlee4

Differential Revision: https://reviews.facebook.net/D39195
2f46c36
@yoshinorim yoshinorim closed this
@yoshinorim yoshinorim referenced this issue from a commit
@yoshinorim yoshinorim Prevent from block cache eviction by full table scan #68
Summary:
This diff adds a new session variable rocksdb_skip_fill_cache (default
false, and enabled at mysqldump), and set ReadOptions.fill_cache = false if turned on.
This avoids mysqldump filling block cache.

Test Plan: new test case mysqldump2

Reviewers: maykov, spetrunia, hermanlee4

Reviewed By: hermanlee4

Differential Revision: https://reviews.facebook.net/D39195
1eab1f6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.