Commit ce9fa51
Add rocksdb_block_cache_numshardbits for issue 1336 (percona#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 8efbe05 commit ce9fa51
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 | |
|---|---|---|---|
| |||
804 | 804 | | |
805 | 805 | | |
806 | 806 | | |
| 807 | + | |
807 | 808 | | |
808 | 809 | | |
809 | 810 | | |
| |||
1863 | 1864 | | |
1864 | 1865 | | |
1865 | 1866 | | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
1866 | 1874 | | |
1867 | 1875 | | |
1868 | 1876 | | |
| |||
2732 | 2740 | | |
2733 | 2741 | | |
2734 | 2742 | | |
| 2743 | + | |
2735 | 2744 | | |
2736 | 2745 | | |
2737 | 2746 | | |
| |||
6744 | 6753 | | |
6745 | 6754 | | |
6746 | 6755 | | |
6747 | | - | |
6748 | | - | |
| 6756 | + | |
6749 | 6757 | | |
6750 | 6758 | | |
6751 | 6759 | | |
6752 | 6760 | | |
6753 | | - | |
| 6761 | + | |
6754 | 6762 | | |
6755 | 6763 | | |
6756 | 6764 | | |
| |||
0 commit comments