File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -540,9 +540,10 @@ class BlockCacheConfig {
540540 // to Intel DSA via the DTO library. Requires data checksum to be enabled
541541 // and CacheLib built with BUILD_WITH_DTO. @minSize is the minimum value
542542 // size to use the offloaded path; smaller values are checksummed in
543- // software to avoid accelerator submission overhead.
543+ // software, since submitting and polling a descriptor costs about what the
544+ // CPU needs to CRC 16-32 KiB (16 KiB measured as the break-even).
544545 BlockCacheConfig& setChecksumOffload (bool checksumOffload,
545- uint32_t minSize = 4096 ) noexcept {
546+ uint32_t minSize = 16384 ) noexcept {
546547 checksumOffload_ = checksumOffload;
547548 checksumOffloadMinSize_ = minSize;
548549 return *this ;
@@ -716,7 +717,7 @@ class BlockCacheConfig {
716717 // Whether to offload data checksumming to Intel DSA (fused with the value
717718 // copy on the write path), and the minimum value size to do so.
718719 bool checksumOffload_{false };
719- uint32_t checksumOffloadMinSize_{4096 };
720+ uint32_t checksumOffloadMinSize_{16384 };
720721 uint32_t checksumOffloadReadMinSize_{0 };
721722 bool checksumOffloadCacheControl_{true };
722723 // Whether to remove an item by checking the key (true) or only the hash value
Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ struct CacheConfig : public JSONConfig {
280280 // (no intermediate copy), or do that copy on Intel DSA.
281281 bool navyBlockCacheDirectFlush{false };
282282 bool navyBlockCacheFlushCopyOffload{false };
283- uint32_t navyChecksumOffloadMinSize{4096 };
283+ uint32_t navyChecksumOffloadMinSize{16384 };
284284 // separate gate for read-side verification (0 = same as the write gate;
285285 // 4294967295 disables read-side offload), and the cache-control hint on the
286286 // fused write copy. See BlockCache::Config.
Original file line number Diff line number Diff line change @@ -61,9 +61,11 @@ class BlockCache final : public Engine {
6161 // checksum to be enabled. No effect when built without DTO support.
6262 bool checksumOffload{false };
6363 // Minimum value size to use the offloaded (fused) path on the WRITE path;
64- // smaller values use software copy+checksum to avoid accelerator
65- // submission overhead.
66- uint32_t checksumOffloadMinSize{4096 };
64+ // smaller values use software copy+checksum. Submitting and polling a
65+ // descriptor costs a few microseconds regardless of size, about what the
66+ // CPU needs to CRC 16-32 KiB; on a size-diverse (CDN) workload a 16 KiB
67+ // gate beat 4 KiB by 4% of process CPU and 32 KiB was indistinguishable.
68+ uint32_t checksumOffloadMinSize{16384 };
6769 // Minimum value size to offload checksum VERIFICATION (lookup, reclaim,
6870 // reinsertion, cleanup). 0 = same as checksumOffloadMinSize. The read side
6971 // has no CPU work to overlap with the accelerator, so its break-even size
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ if isTraceReplay:
186186 cc["navyDataChecksum"] = True
187187 cc["navyChecksumOffload"] = offload == "on"
188188 # only a default: a base config that sets the gate (a size sweep) wins
189- cc.setdefault("navyChecksumOffloadMinSize", 4096 )
189+ cc.setdefault("navyChecksumOffloadMinSize", 16384 )
190190elif offload != "none":
191191 # Synthetic workloads (CDN): the base config is DRAM-only; add the
192192 # hybrid Navy tier the offload applies to.
@@ -199,7 +199,7 @@ elif offload != "none":
199199 cc.setdefault("navyWriterThreads", 32)
200200 cc["navyDataChecksum"] = True
201201 cc["navyChecksumOffload"] = offload == "on"
202- cc.setdefault("navyChecksumOffloadMinSize", 4096 )
202+ cc.setdefault("navyChecksumOffloadMinSize", 16384 )
203203
204204huge = int(os.environ.get("HUGE_BYTES", "0"))
205205# DRAM cache (slabs + hash table) on SysV shm so the page-size knob actually
You can’t perform that action at this time.
0 commit comments