Commit 45cf667
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 74db42d commit 45cf667
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 | |
|---|---|---|---|
| |||
902 | 902 | | |
903 | 903 | | |
904 | 904 | | |
| 905 | + | |
905 | 906 | | |
906 | 907 | | |
907 | 908 | | |
| |||
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 | |
|---|---|---|---|
| |||
792 | 792 | | |
793 | 793 | | |
794 | 794 | | |
| 795 | + | |
795 | 796 | | |
796 | 797 | | |
797 | 798 | | |
| |||
1841 | 1842 | | |
1842 | 1843 | | |
1843 | 1844 | | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
1844 | 1852 | | |
1845 | 1853 | | |
1846 | 1854 | | |
| |||
2690 | 2698 | | |
2691 | 2699 | | |
2692 | 2700 | | |
| 2701 | + | |
2693 | 2702 | | |
2694 | 2703 | | |
2695 | 2704 | | |
| |||
6674 | 6683 | | |
6675 | 6684 | | |
6676 | 6685 | | |
6677 | | - | |
6678 | | - | |
| 6686 | + | |
6679 | 6687 | | |
6680 | 6688 | | |
6681 | 6689 | | |
6682 | 6690 | | |
6683 | | - | |
| 6691 | + | |
6684 | 6692 | | |
6685 | 6693 | | |
6686 | 6694 | | |
| |||
0 commit comments