Skip to content

Conversation

@mdcallag
Copy link
Contributor

This fixes #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.

This fixes facebook#1336

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.
Copy link
Contributor

@laurynas-biveinis laurynas-biveinis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is likely main.mysqld--help-notwin test needs a re-record

@facebook-github-bot
Copy link

@hermanlee has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link

@mdcallag has updated the pull request. You must reimport the pull request before landing.

@mdcallag
Copy link
Contributor Author

It is likely main.mysqld--help-notwin test needs a re-record

Done

facebook-github-bot pushed a commit that referenced this pull request Jul 20, 2023
Summary:
This fixes #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: #1339

Differential Revision: D47635762

fbshipit-source-id: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
luqun pushed a commit to luqun/mysql-5.6 that referenced this pull request Aug 10, 2023
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: D47635762

fbshipit-source-id: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
hermanlee pushed a commit to hermanlee/mysql-5.6 that referenced this pull request Oct 3, 2023
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: D47635762
hermanlee pushed a commit to hermanlee/mysql-5.6 that referenced this pull request Oct 18, 2023
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: D47635762
inikep pushed a commit to inikep/percona-server that referenced this pull request Dec 20, 2023
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Dec 20, 2023
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Dec 21, 2023
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Jan 15, 2024
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to percona/percona-server that referenced this pull request Jan 17, 2024
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Jan 17, 2024
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Jan 17, 2024
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Feb 8, 2024
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Feb 9, 2024
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Feb 9, 2024
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Feb 12, 2024
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Apr 12, 2024
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Apr 12, 2024
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Apr 12, 2024
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Apr 15, 2024
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Apr 15, 2024
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Apr 15, 2024
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Apr 15, 2024
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Apr 15, 2024
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Apr 16, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Apr 16, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Apr 16, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
percona-ysorokin pushed a commit to percona-ysorokin/percona-server that referenced this pull request Apr 18, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Apr 28, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Apr 30, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request May 4, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request May 4, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Jun 5, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Jun 5, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Jun 5, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Jul 31, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
percona-ysorokin pushed a commit to percona-ysorokin/percona-server that referenced this pull request Jul 31, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Jul 31, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Jul 31, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Jul 31, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
percona-ysorokin pushed a commit to percona-ysorokin/percona-server that referenced this pull request Aug 2, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Aug 5, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Oct 22, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Oct 27, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
dlenev pushed a commit to dlenev/percona-server that referenced this pull request Oct 30, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 4, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 4, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 5, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 5, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 6, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
dlenev pushed a commit to dlenev/percona-server that referenced this pull request Nov 7, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 11, 2025
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Jan 20, 2026
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
inikep pushed a commit to inikep/percona-server that referenced this pull request Jan 21, 2026
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: 7ca759f9a001dbe1a20978ded5b614c209bd5b1f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants