[improvement](MOW) use seperated cache for mow pk cache (#19686)

In mow, primary key cache have a big impact on load performance, so we add a new cache type to seperate
it from page cache to make it more flexible in some cases
This commit is contained in:
yixiutt
2023-05-18 13:27:09 +08:00
committed by GitHub
parent 50370dead9
commit 943e5fb7e5
13 changed files with 54 additions and 11 deletions

View File

@ -238,7 +238,14 @@ Status ExecEnv::_init_mem_env() {
<< ". Please modify the 'storage_page_cache_shard_size' parameter in your "
"conf file to be a power of two for better performance.";
}
StoragePageCache::create_global_cache(storage_cache_limit, index_percentage, num_shards);
int64_t pk_storage_page_cache_limit =
ParseUtil::parse_mem_spec(config::pk_storage_page_cache_limit, MemInfo::mem_limit(),
MemInfo::physical_mem(), &is_percent);
while (!is_percent && pk_storage_page_cache_limit > MemInfo::mem_limit() / 2) {
pk_storage_page_cache_limit = storage_cache_limit / 2;
}
StoragePageCache::create_global_cache(storage_cache_limit, index_percentage,
pk_storage_page_cache_limit, num_shards);
LOG(INFO) << "Storage page cache memory limit: "
<< PrettyPrinter::print(storage_cache_limit, TUnit::BYTES)
<< ", origin config value: " << config::storage_page_cache_limit;