Commit 6d6bd4b
[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 ab6ccc6 commit 6d6bd4b
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1323 | 1323 | | |
1324 | 1324 | | |
1325 | 1325 | | |
| 1326 | + | |
| 1327 | + | |
1326 | 1328 | | |
1327 | 1329 | | |
1328 | 1330 | | |
| |||
2526 | 2528 | | |
2527 | 2529 | | |
2528 | 2530 | | |
| 2531 | + | |
2529 | 2532 | | |
2530 | 2533 | | |
2531 | 2534 | | |
| |||
0 commit comments