Skip to content

CRC / Copy offloading to Intel Data Streaming Accelerator#470

Open
byrnedj wants to merge 3 commits into
facebook:mainfrom
byrnedj:crc_upstream
Open

CRC / Copy offloading to Intel Data Streaming Accelerator#470
byrnedj wants to merge 3 commits into
facebook:mainfrom
byrnedj:crc_upstream

Conversation

@byrnedj

@byrnedj byrnedj commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Adds optional offload of Navy's data checksumming to Intel DSA (Data
Streaming Accelerator), using the DTO library.
On the write path, the value copy into the region buffer and its CRC are
fused into a single DSA Memory Copy with CRC Generation descriptor that
the calling fiber/thread submits before yielding; on the read path, all
verification sites (lookup, reclaim, cleanup, reinsertion, random-alloc)
can verify on the accelerator. BigHash bucket checksums offload with the
bloom-filter rebuild as the overlap work. Note, we need to use CRC32C for
compatible CRC polynomial for DSA.

Also adds DTO transparent usage to cache insertions in cachebench.

We use navyChecksumOffload(+checksumOffloadMinSize, default 4096) and a BUILD_WITH_DTO` cmake option, with a runtime
DSA-vs-CPU parity self-check at engine creation that falls back to
software on mismatch.

Benchmarks

BigCache production trace replay (12M ops, ~48KB avg objects,
BlockCache-only, fiber scheduler):

no checksum software CRC DSA offload
Insert p50 / p99.9 17 / 262 µs 41 / 628 µs 16 / 451 µs
Lookup p99 9.3 ms 10.6 ms 8.6 ms

ucache_bench (DCPerf, hybrid DRAM+Navy, small objects): CPU
−2.9% (fibers) / +0.7% (thread pool), P99.9 −14% / −21%, equal QPS.

How to test

# unit tests (needs an enabled DSA shared WQ; falls back cleanly without)
build-cachelib/navy/navy-test-ChecksumOffloadTest

# end-to-end harness: builds with DTO, configures DSA WQs, runs on socket 0
./run_dsa_cachebench.sh --workload bigcache --offload off --fibers on   # B: software
./run_dsa_cachebench.sh --workload bigcache --offload on  --fibers on   # C: DSA
./run_dsa_cachebench.sh --workload cdn --offload on --intercept on      # + transparent memcpy intercept

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant