io prefetch: the experts.bin tier fills the page cache from the I/O threads and the kernels read the mapping (no staging, nothing waits); cheaper residency probe
The first version staged every uncached blob and made the layer wait for all of them before any expert computed, which lost the overlap the kernels' own page faults had (-19% on a cold 16 GB lane). Now prefetch() hands the layer's uncached blobs to the I/O threads and returns; the kernels that reach a blob before it lands wait on its pages, the others compute. STRATA_IO_PF_STAGE=1 keeps the staging variant. Residency is probed on four sampled pages, not the whole blob.
This commit is contained in:
1 parent
9745567e5f
commit
aa659c9eb9
3 files changed
+82
-18
No files matched your search
@@ -3753,8 +3753,8 @@ int main(int argc, char** argv) {
|
||||
src.set_io_prefetch(true, th != nullptr ? std::atoi(th) : 0);
|
||||
if (src.io_prefetch())
|
||||
std::fprintf(stderr, "strata generate: file tier io prefetch ON (STRATA_IO_PREFETCH=1): whole-blob preads, "
|
||||
"predicted experts read ahead on %s I/O threads (STRATA_IO_PF_THREADS, default 4)\n",
|
||||
th != nullptr ? th : "4");
|
||||
"the layer's uncached experts and the predicted ones read by %s I/O threads (STRATA_IO_PF_THREADS, default 8)\n",
|
||||
th != nullptr ? th : "8");
|
||||
else
|
||||
std::fprintf(stderr, "strata generate: STRATA_IO_PREFETCH=1 is not available here (Linux mapped file tier "
|
||||
"only, not with unbuffered reads); the file tier reads as before\n");
|
||||
|
||||
Reference in new issue
Block a user