diff options
| author | Dan Engelbrecht <[email protected]> | 2024-10-09 09:40:59 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-10-09 09:40:59 +0200 |
| commit | 2ca4e1c088b6726d44c6f475ff1106374444b1a2 (patch) | |
| tree | 9d1239c09adac8d21b85a5db8f9b209c23825399 /src/zenstore/cache/cachedisklayer.cpp | |
| parent | remove temporary workaround involving _LIBCPP_DISABLE_AVAILABILITY (#191) (diff) | |
| download | zen-2ca4e1c088b6726d44c6f475ff1106374444b1a2.tar.xz zen-2ca4e1c088b6726d44c6f475ff1106374444b1a2.zip | |
don't read chunks into memory during cache batch fetch unless we may cache them in memory (#188)
* Don't read chunks into memory during cache batch fetch unless we may cache them in memory
Diffstat (limited to 'src/zenstore/cache/cachedisklayer.cpp')
| -rw-r--r-- | src/zenstore/cache/cachedisklayer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/zenstore/cache/cachedisklayer.cpp b/src/zenstore/cache/cachedisklayer.cpp index 8a2de34e2..9161905d7 100644 --- a/src/zenstore/cache/cachedisklayer.cpp +++ b/src/zenstore/cache/cachedisklayer.cpp @@ -1503,7 +1503,8 @@ ZenCacheDiskLayer::CacheBucket::EndGetBatch(GetBatchHandle* Batch) noexcept { ZEN_TRACE_CPU("Z$::Bucket::EndGetBatch::ReadInline"); m_BlockStore.IterateChunks(InlineBlockLocations, [&](uint32_t, std::span<const size_t> ChunkIndexes) -> bool { - const uint64_t LargeChunkSizeLimit = Max(m_Configuration.MemCacheSizeThreshold, 32u * 1024u); + // Only read into memory the IoBuffers we could potentially add to memcache + const uint64_t LargeChunkSizeLimit = Max(m_Configuration.MemCacheSizeThreshold, 1u * 1024u); m_BlockStore.IterateBlock( InlineBlockLocations, ChunkIndexes, |