diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-04-12 10:29:11 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-04-12 11:59:01 +0200 |
commit | 7ee931b51e4f02313c86e9c5f7c64aadbc4b03de (patch) | |
tree | 4c79b16277c092f4dc2d74ec977ebd985aa19b91 /src/buildtool/execution_api/execution_service/capabilities_server.cpp | |
parent | 920dbcad30333ea91e34c8c5da07bb6f499c4925 (diff) | |
download | justbuild-7ee931b51e4f02313c86e9c5f7c64aadbc4b03de.tar.gz |
file chunker: increase chunk sizes
As we use chunking also for reducing storage, we have to consider
the overhead of block devices which is in the order of kB per file.
So our target chunk size should be at least 2 orders of magnitude
above this. This suggests to minimally aim for a chunk size of
128kB, a target size that also has the advantage the that maximal
chunk size associated with this size is 1MB which is still well
below the maximal transmission size of grpc allowing us to avoid
the streaming API.
As we're scaling everything up by a factor of 16, we also have
to increase the number of bits in the involved masks by 4. We use
this to also extend the window size by using the 2 most significant
octets. Following the advice of the paper proposing FastCDC to
spread out the ones roughly equally suggests 0x4444 as a suitable
value for the two most significant octets.
We also change the suggested extension of the remote-execution API
accordingly. As the precise parameters for FastCDC when announced
over the remote-execution APIs are still under discussion upstream,
we simplify the name to not mention the target size.
Diffstat (limited to 'src/buildtool/execution_api/execution_service/capabilities_server.cpp')
-rw-r--r-- | src/buildtool/execution_api/execution_service/capabilities_server.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/buildtool/execution_api/execution_service/capabilities_server.cpp b/src/buildtool/execution_api/execution_service/capabilities_server.cpp index 1f34b388..71a1361f 100644 --- a/src/buildtool/execution_api/execution_service/capabilities_server.cpp +++ b/src/buildtool/execution_api/execution_service/capabilities_server.cpp @@ -41,8 +41,7 @@ auto CapabilitiesServiceImpl::GetCapabilities( static_assert(kMaxBatchTransferSize < GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH, "Max batch transfer size too large."); cache.add_supported_chunking_algorithms( - ::bazel_re::ChunkingAlgorithm_Value:: - ChunkingAlgorithm_Value_FASTCDC_MT0_8KB); + ::bazel_re::ChunkingAlgorithm_Value::ChunkingAlgorithm_Value_FASTCDC); *(response->mutable_cache_capabilities()) = cache; exec.set_digest_function( |