Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce the block cache configurations into a single one #1549

Merged
merged 13 commits into from
Jul 9, 2023

Conversation

Yangsx-1
Copy link
Contributor

@Yangsx-1 Yangsx-1 commented Jul 5, 2023

Close #1495

kvrocks.conf Outdated Show resolved Hide resolved
src/config/config.cc Outdated Show resolved Hide resolved
src/storage/storage.cc Outdated Show resolved Hide resolved
@git-hulk
Copy link
Member

git-hulk commented Jul 6, 2023

@Yangsx-1 Another point is that needs to ignore the below configurations when rewriting:

  • rocksdb.share_metadata_and_subkey_block_cache
  • rocksdb.metadata_block_cache_size
  • rocksdb.subkey_block_cache_size

to make sure they won't appear in the config file.

kvrocks.conf Outdated Show resolved Hide resolved
@Yangsx-1
Copy link
Contributor Author

Yangsx-1 commented Jul 6, 2023

@Yangsx-1 Another point is that needs to ignore the below configurations when rewriting:

  • rocksdb.share_metadata_and_subkey_block_cache
  • rocksdb.metadata_block_cache_size
  • rocksdb.subkey_block_cache_size

to make sure they won't appear in the config file.

This means that these configurations shouldn't be in the config file? If it appears, there may be some warning messages or error?

@git-hulk
Copy link
Member

git-hulk commented Jul 6, 2023

@Yangsx-1 Another point is that needs to ignore the below configurations when rewriting:

  • rocksdb.share_metadata_and_subkey_block_cache
  • rocksdb.metadata_block_cache_size
  • rocksdb.subkey_block_cache_size

to make sure they won't appear in the config file.

This means that these configurations shouldn't be in the config file? If it appears, there may be some warning messages or error?

What I mean is to remove them from the kvrocks.conf and keep the config.cc as it is, since the rocksdb.block_cache_size is expected to calculate from them if it's not set.

@Yangsx-1
Copy link
Contributor Author

Yangsx-1 commented Jul 6, 2023

@Yangsx-1 Another point is that needs to ignore the below configurations when rewriting:

  • rocksdb.share_metadata_and_subkey_block_cache
  • rocksdb.metadata_block_cache_size
  • rocksdb.subkey_block_cache_size

to make sure they won't appear in the config file.

This means that these configurations shouldn't be in the config file? If it appears, there may be some warning messages or error?

What I mean is to remove them from the kvrocks.conf and keep the config.cc as it is, since the rocksdb.block_cache_size is expected to calculate from them if it's not set.

OK

src/storage/storage.cc Outdated Show resolved Hide resolved
src/storage/storage.cc Outdated Show resolved Hide resolved
@git-hulk git-hulk requested a review from torwig July 6, 2023 15:53
@git-hulk
Copy link
Member

git-hulk commented Jul 6, 2023

Others are generally good for me, thanks for your efforts.

@git-hulk git-hulk requested a review from PragmaTwice July 7, 2023 05:16
@PragmaTwice
Copy link
Member

PragmaTwice commented Jul 8, 2023

@git-hulk rocksdb.share_metadata_and_subkey_block_cache is completely ignored after the change (it will always be ON, despite whether the option is ON or OFF). Is it OK?

@git-hulk
Copy link
Member

git-hulk commented Jul 8, 2023

@git-hulk rocksdb.share_metadata_and_subkey_block_cache is completely ignored after the change (it will always be ON, despite whether the option is ON or OFF). Is it OK?

Yes, it's intentional. And it's a historically wrong decision to separate the block cache between column families. From the user side, it's really hard to balance the cache capacity between column families, the best way is to let LRU determine. To avoid the change being too aggressive, @ShooterIT added this option to allow users to use the old way. But from the performance, sharing the block cache is always better than the separate, so I think it's time to ignore this configuration and remove it in next major version.

@PragmaTwice PragmaTwice merged commit 2a927ce into apache:unstable Jul 9, 2023
23 checks passed
@PragmaTwice
Copy link
Member

Thanks for your contribution!

@Yangsx-1 Yangsx-1 deleted the reduce-config branch July 9, 2023 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[proposal] Reduce the block cache configurations into a single one
3 participants