From f6a55c3c8939428c8c78028819f978e6a93d32eb Mon Sep 17 00:00:00 2001 From: Googler Date: Wed, 4 Sep 2024 06:30:48 -0700 Subject: [PATCH] Change the default value of `experimental_remote_cache_compression_threshold` to `100`. Based on discussions in #18997, `~100` is the break even point where the compression actually helps the builds. RELNOTES: The default value of `--experimental_remote_cache_compression_threshold` is changed to `100`. PiperOrigin-RevId: 670948584 Change-Id: I33ef54e84d68da5df5526a95cd9b7d94e746c9b5 --- .../devtools/build/lib/remote/options/RemoteOptions.java | 4 +++- .../google/devtools/build/lib/remote/GrpcCacheClientTest.java | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java b/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java index 8b6183f719e72e..6acf253ea7c7f5 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java +++ b/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java @@ -412,7 +412,9 @@ public RemoteBuildEventUploadModeConverter() { @Option( name = "experimental_remote_cache_compression_threshold", - defaultValue = "0", + // Based on discussions in #18997, `~100` is the break even point where the compression + // actually helps the builds. + defaultValue = "100", documentationCategory = OptionDocumentationCategory.REMOTE, effectTags = {OptionEffectTag.UNKNOWN}, help = diff --git a/src/test/java/com/google/devtools/build/lib/remote/GrpcCacheClientTest.java b/src/test/java/com/google/devtools/build/lib/remote/GrpcCacheClientTest.java index 476346bc01fada..52f26def022b4c 100644 --- a/src/test/java/com/google/devtools/build/lib/remote/GrpcCacheClientTest.java +++ b/src/test/java/com/google/devtools/build/lib/remote/GrpcCacheClientTest.java @@ -1242,6 +1242,7 @@ public void compressedDownloadBlobIsRetriedWithProgress() throws IOException, InterruptedException { RemoteOptions options = Options.getDefaults(RemoteOptions.class); options.cacheCompression = true; + options.cacheCompressionThreshold = 0; final GrpcCacheClient client = newClient(options); final Digest digest = DIGEST_UTIL.computeAsUtf8("abcdefg"); ByteString chunk1 = ByteString.copyFrom(Zstd.compress("abc".getBytes(UTF_8)));