diff options
| author | Dan Engelbrecht <[email protected]> | 2026-01-29 12:41:55 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-01-29 12:41:55 +0100 |
| commit | 8aab9458098c29b4bc9e9bff1d4591ced7c9a970 (patch) | |
| tree | 4d28bd7f02a7d4a05edb406dd174068cddd3720e /src | |
| parent | don't do full cb-object validation on cache records when read from disk (#739) (diff) | |
| download | zen-8aab9458098c29b4bc9e9bff1d4591ced7c9a970.tar.xz zen-8aab9458098c29b4bc9e9bff1d4591ced7c9a970.zip | |
reduce batch size for reads (#740)
* reduce maximum size per chunk to read to reduce disk contention
* increase timeout before warning on slow shut down of zenserver
* reduce default window size for blockstore chunk iteration
Diffstat (limited to 'src')
| -rw-r--r-- | src/zencore/basicfile.cpp | 2 | ||||
| -rw-r--r-- | src/zenhttp/clients/httpclientcommon.cpp | 2 | ||||
| -rw-r--r-- | src/zenstore/blockstore.cpp | 4 | ||||
| -rw-r--r-- | src/zenutil/zenserverprocess.cpp | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/zencore/basicfile.cpp b/src/zencore/basicfile.cpp index 2fa02937d..bd4d119fb 100644 --- a/src/zencore/basicfile.cpp +++ b/src/zencore/basicfile.cpp @@ -181,7 +181,7 @@ BasicFile::ReadRange(uint64_t FileOffset, uint64_t ByteCount) void BasicFile::Read(void* Data, uint64_t BytesToRead, uint64_t FileOffset) { - const uint64_t MaxChunkSize = 2u * 1024 * 1024 * 1024; + const uint64_t MaxChunkSize = 512u * 1024u; std::error_code Ec; ReadFile(m_FileHandle, Data, BytesToRead, FileOffset, MaxChunkSize, Ec); if (Ec) diff --git a/src/zenhttp/clients/httpclientcommon.cpp b/src/zenhttp/clients/httpclientcommon.cpp index 8e5136dff..47425e014 100644 --- a/src/zenhttp/clients/httpclientcommon.cpp +++ b/src/zenhttp/clients/httpclientcommon.cpp @@ -309,7 +309,7 @@ namespace detail { void BufferedReadFileStream::Read(void* Data, uint64_t BytesToRead, uint64_t FileOffset) { - const uint64_t MaxChunkSize = 1u * 1024 * 1024; + const uint64_t MaxChunkSize = 512u * 1024u; std::error_code Ec; ReadFile(m_FileHandle, Data, BytesToRead, FileOffset, MaxChunkSize, Ec); diff --git a/src/zenstore/blockstore.cpp b/src/zenstore/blockstore.cpp index 0542d1171..3ea91ead6 100644 --- a/src/zenstore/blockstore.cpp +++ b/src/zenstore/blockstore.cpp @@ -374,7 +374,7 @@ BlockStoreFile::GetMetaPath() const //////////////////////////////////////////////////////// -constexpr uint64_t DefaultIterateSmallChunkWindowSize = 2 * 1024 * 1024; +constexpr uint64_t DefaultIterateSmallChunkWindowSize = 512u * 1024u; BlockStore::BlockStore() { @@ -953,7 +953,7 @@ BlockStore::IterateBlock(std::span<const BlockStoreLocation> ChunkLocations, uint64_t IterateSmallChunkWindowSize = Max(DefaultIterateSmallChunkWindowSize, LargeSizeLimit); - const uint64_t IterateSmallChunkMaxGapSize = Max(2048u, IterateSmallChunkWindowSize / 512u); + const uint64_t IterateSmallChunkMaxGapSize = Max(2048u, IterateSmallChunkWindowSize / 256u); IterateSmallChunkWindowSize = Min((LargeSizeLimit + IterateSmallChunkMaxGapSize) * ChunkLocations.size(), IterateSmallChunkWindowSize); diff --git a/src/zenutil/zenserverprocess.cpp b/src/zenutil/zenserverprocess.cpp index b56df400d..ef2a4fda5 100644 --- a/src/zenutil/zenserverprocess.cpp +++ b/src/zenutil/zenserverprocess.cpp @@ -698,7 +698,7 @@ ZenServerInstance::Shutdown() { Stopwatch Timer; ZEN_DEBUG("Waiting for zenserver process {} ({}) to shut down", m_Name, m_Process.Pid()); - while (!m_Process.Wait(1000)) + while (!m_Process.Wait(2000)) { if (!m_Process.IsValid()) { |