Commit 80b6490
[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 99484cc commit 80b6490
5 files changed
Lines changed: 28 additions & 3 deletions
File tree
- mysql-test
- r
- suite
- rocksdb_sys_vars
- r
- t
- rocksdb/r
- storage/rocksdb
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1356 | 1356 | | |
1357 | 1357 | | |
1358 | 1358 | | |
| 1359 | + | |
| 1360 | + | |
1359 | 1361 | | |
1360 | 1362 | | |
1361 | 1363 | | |
| |||
2564 | 2566 | | |
2565 | 2567 | | |
2566 | 2568 | | |
| 2569 | + | |
2567 | 2570 | | |
2568 | 2571 | | |
2569 | 2572 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
896 | 896 | | |
897 | 897 | | |
898 | 898 | | |
| 899 | + | |
899 | 900 | | |
900 | 901 | | |
901 | 902 | | |
| |||
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 | |
|---|---|---|---|
| |||
791 | 791 | | |
792 | 792 | | |
793 | 793 | | |
| 794 | + | |
794 | 795 | | |
795 | 796 | | |
796 | 797 | | |
| |||
1709 | 1710 | | |
1710 | 1711 | | |
1711 | 1712 | | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
1712 | 1720 | | |
1713 | 1721 | | |
1714 | 1722 | | |
| |||
2520 | 2528 | | |
2521 | 2529 | | |
2522 | 2530 | | |
| 2531 | + | |
2523 | 2532 | | |
2524 | 2533 | | |
2525 | 2534 | | |
| |||
6211 | 6220 | | |
6212 | 6221 | | |
6213 | 6222 | | |
6214 | | - | |
6215 | | - | |
| 6223 | + | |
6216 | 6224 | | |
6217 | 6225 | | |
6218 | 6226 | | |
6219 | 6227 | | |
6220 | | - | |
| 6228 | + | |
6221 | 6229 | | |
6222 | 6230 | | |
6223 | 6231 | | |
| |||
0 commit comments