Skip to content

Commit

Permalink
Merge pull request ClickHouse#65305 from ClickHouse/byepc
Browse files Browse the repository at this point in the history
Disable userspace page cache by default
  • Loading branch information
alexey-milovidov authored Jun 23, 2024
2 parents a6537bb + 952aae8 commit a9bdce0
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 129 deletions.
2 changes: 1 addition & 1 deletion src/Common/ICachePolicy.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ICachePolicy

/// HashFunction usually hashes the entire key and the found key will be equal the provided key. In such cases, use get(). It is also
/// possible to store other, non-hashed data in the key. In that case, the found key is potentially different from the provided key.
/// Then use getWithKey() to also return the found key including it's non-hashed data.
/// Then use getWithKey() to also return the found key including its non-hashed data.
virtual MappedPtr get(const Key & key) = 0;
virtual std::optional<KeyMapped> getWithKey(const Key &) = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/Core/ServerSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ namespace DB
M(Double, index_mark_cache_size_ratio, DEFAULT_INDEX_MARK_CACHE_SIZE_RATIO, "The size of the protected queue in the secondary index mark cache relative to the cache's total size.", 0) \
M(UInt64, page_cache_chunk_size, 2 << 20, "Bytes per chunk in userspace page cache. Rounded up to a multiple of page size (typically 4 KiB) or huge page size (typically 2 MiB, only if page_cache_use_thp is enabled).", 0) \
M(UInt64, page_cache_mmap_size, 1 << 30, "Bytes per memory mapping in userspace page cache. Not important.", 0) \
M(UInt64, page_cache_size, 10ul << 30, "Amount of virtual memory to map for userspace page cache. If page_cache_use_madv_free is enabled, it's recommended to set this higher than the machine's RAM size. Use 0 to disable userspace page cache.", 0) \
M(UInt64, page_cache_size, 0, "Amount of virtual memory to map for userspace page cache. If page_cache_use_madv_free is enabled, it's recommended to set this higher than the machine's RAM size. Use 0 to disable userspace page cache.", 0) \
M(Bool, page_cache_use_madv_free, DBMS_DEFAULT_PAGE_CACHE_USE_MADV_FREE, "If true, the userspace page cache will allow the OS to automatically reclaim memory from the cache on memory pressure (using MADV_FREE).", 0) \
M(Bool, page_cache_use_transparent_huge_pages, true, "Userspace will attempt to use transparent huge pages on Linux. This is best-effort.", 0) \
M(UInt64, mmap_cache_size, DEFAULT_MMAP_CACHE_MAX_SIZE, "A cache for mmapped files.", 0) \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@
</policies>
</storage_configuration>

<page_cache_size>10000000000</page_cache_size>

<query_log></query_log>
</clickhouse>
21 changes: 0 additions & 21 deletions tests/queries/0_stateless/02867_page_cache.reference

This file was deleted.

106 changes: 0 additions & 106 deletions tests/queries/0_stateless/02867_page_cache.sql

This file was deleted.

0 comments on commit a9bdce0

Please sign in to comment.