Commit 7302109
[myrocks] Add rocksdb_block_cache_numshardbits for issue 1336 (facebook#1339)
Summary:
This fixes facebook#1336
This adds the my.cnf options: rocksdb_block_cache_numshardbits
This option can be set so that RocksDB to fix the number of block cache shards.
The default value is -1 to match existing behavior. When -1 RocksDB code will determine the number of block cache shards as min(6, rocksdb_block_cache_size / min_shard_size) and today min_shard_size is 512K for LRU and 32M for Hyper.
The math above frequently results in a block cache with too many small shards when rocksdb_block_cache_size is not too big (a few GB is not too big) and there will be perf problems that are hard to debug in such a case.
Pull Request resolved: facebook#1339
Differential Revision: D476357621 parent 8495ab0 commit 7302109
4 files changed
Lines changed: 25 additions & 3 deletions
File tree
- mysql-test/suite
- rocksdb_sys_vars
- r
- t
- rocksdb/r
- storage/rocksdb
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
897 | 897 | | |
898 | 898 | | |
899 | 899 | | |
| 900 | + | |
900 | 901 | | |
901 | 902 | | |
902 | 903 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
789 | 789 | | |
790 | 790 | | |
791 | 791 | | |
| 792 | + | |
792 | 793 | | |
793 | 794 | | |
794 | 795 | | |
| |||
1715 | 1716 | | |
1716 | 1717 | | |
1717 | 1718 | | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
1718 | 1726 | | |
1719 | 1727 | | |
1720 | 1728 | | |
| |||
2522 | 2530 | | |
2523 | 2531 | | |
2524 | 2532 | | |
| 2533 | + | |
2525 | 2534 | | |
2526 | 2535 | | |
2527 | 2536 | | |
| |||
6216 | 6225 | | |
6217 | 6226 | | |
6218 | 6227 | | |
6219 | | - | |
6220 | | - | |
| 6228 | + | |
6221 | 6229 | | |
6222 | 6230 | | |
6223 | 6231 | | |
6224 | 6232 | | |
6225 | | - | |
| 6233 | + | |
6226 | 6234 | | |
6227 | 6235 | | |
6228 | 6236 | | |
| |||
0 commit comments