Commit aa0e6ba
[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 54a1078 commit aa0e6ba
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 | |
|---|---|---|---|
| |||
790 | 790 | | |
791 | 791 | | |
792 | 792 | | |
| 793 | + | |
793 | 794 | | |
794 | 795 | | |
795 | 796 | | |
| |||
1716 | 1717 | | |
1717 | 1718 | | |
1718 | 1719 | | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
1719 | 1727 | | |
1720 | 1728 | | |
1721 | 1729 | | |
| |||
2527 | 2535 | | |
2528 | 2536 | | |
2529 | 2537 | | |
| 2538 | + | |
2530 | 2539 | | |
2531 | 2540 | | |
2532 | 2541 | | |
| |||
6224 | 6233 | | |
6225 | 6234 | | |
6226 | 6235 | | |
6227 | | - | |
6228 | | - | |
| 6236 | + | |
6229 | 6237 | | |
6230 | 6238 | | |
6231 | 6239 | | |
6232 | 6240 | | |
6233 | | - | |
| 6241 | + | |
6234 | 6242 | | |
6235 | 6243 | | |
6236 | 6244 | | |
| |||
0 commit comments