Commit d3cf010
Add rocksdb_block_cache_numshardbits for issue 1336 (#1339)
Upstream commit ID: facebook/mysql-5.6@730887a
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)
Summary:
This fixes facebook/mysql-5.6#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/mysql-5.6#1339
Differential Revision: D47635762
fbshipit-source-id: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f1 parent 3489157 commit d3cf010
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 | |
|---|---|---|---|
| |||
903 | 903 | | |
904 | 904 | | |
905 | 905 | | |
| 906 | + | |
906 | 907 | | |
907 | 908 | | |
908 | 909 | | |
| |||
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 | |
|---|---|---|---|
| |||
803 | 803 | | |
804 | 804 | | |
805 | 805 | | |
| 806 | + | |
806 | 807 | | |
807 | 808 | | |
808 | 809 | | |
| |||
1858 | 1859 | | |
1859 | 1860 | | |
1860 | 1861 | | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
1861 | 1869 | | |
1862 | 1870 | | |
1863 | 1871 | | |
| |||
2727 | 2735 | | |
2728 | 2736 | | |
2729 | 2737 | | |
| 2738 | + | |
2730 | 2739 | | |
2731 | 2740 | | |
2732 | 2741 | | |
| |||
6733 | 6742 | | |
6734 | 6743 | | |
6735 | 6744 | | |
6736 | | - | |
6737 | | - | |
| 6745 | + | |
6738 | 6746 | | |
6739 | 6747 | | |
6740 | 6748 | | |
6741 | 6749 | | |
6742 | | - | |
| 6750 | + | |
6743 | 6751 | | |
6744 | 6752 | | |
6745 | 6753 | | |
| |||
0 commit comments