mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Fix cache size calculation
This commit is contained in:
parent
875a0a04eb
commit
ba481e6665
@ -21,10 +21,12 @@ namespace DB
|
||||
/// Estimate of number of bytes in cache for marks.
|
||||
struct MarksWeightFunction
|
||||
{
|
||||
/// We spent additional bytes on key in hashmap, linked lists, shared pointers, etc ...
|
||||
static constexpr size_t MARK_CACHE_OVERHEAD = 128;
|
||||
|
||||
size_t operator()(const MarksInCompressedFile & marks) const
|
||||
{
|
||||
/// NOTE Could add extra 100 bytes for overhead of std::vector, cache structures and allocator.
|
||||
return marks.size() * sizeof(MarkInCompressedFile);
|
||||
return marks.size() * sizeof(MarkInCompressedFile) + MARK_CACHE_OVERHEAD;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user