Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 'config: add index_cache_fraction' from Michał Chojnowski
Index caching was disabled by default because it caused performance regressions for some small-partition workloads. See #11202. However, it also means that there are workloads which could benefit from the index cache, but (by default) don't. As a compromise, we can set a default limit on the memory usage of index cache, which should be small enough to avoid catastrophic regressions in small-partition workloads, but big enough to accommodate workloads where index cache is obviously beneficial. This series adds such a configurable limit, sets it to to 0.2 of total cache memory by default, and re-enables index caching by default. Fixes #15118 Closes #14994 * github.com:scylladb/scylladb: test: boost/cache_algorithm_test: add cache_algorithm_test sstables: partition_index_cache: deglobalize stats utils: cached_file: deglobalize cached_file metrics db: config: enable index caching by default config: add index_cache_fraction utils: lru: add move semantics to list links
- Loading branch information
Showing
20 changed files
with
450 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright (C) 2023 ScyllaDB | ||
*/ | ||
|
||
/* | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <cstdint> | ||
|
||
struct partition_index_cache_stats { | ||
uint64_t hits = 0; // Number of times entry was found ready | ||
uint64_t misses = 0; // Number of times entry was not found | ||
uint64_t blocks = 0; // Number of times entry was not ready (>= misses) | ||
uint64_t evictions = 0; // Number of times entry was evicted | ||
uint64_t populations = 0; // Number of times entry was inserted | ||
uint64_t used_bytes = 0; // Number of bytes entries occupy in memory | ||
}; |
Oops, something went wrong.