149: Linux defaults - zero-copy page-cached experts, io prefetch and its decode gate; cgroup RAM check counts the clean page cache
- STRATA_COLD_OVERLAP defaults to 4 on Linux (0 elsewhere), STRATA_IO_PREFETCH to 1 on Linux for the file tier (mapped GGUF in place or experts.bin), STRATA_IO_PF_GATE to 1 with io prefetch. Off switches: STRATA_COLD_OVERLAP=0, STRATA_IO_PREFETCH=0, STRATA_IO_PF_GATE=0. One startup line names them. - cgroup_available_bytes: every clean file page of the group (memory.stat file, active + inactive; else inactive_file) is reclaimable, less min(half of it, limit / 64), as MemAvailable counts page cache on a bare host. A container whose own reads left active cache was judged short of RAM and its file tier switched to unbuffered reads (an 18 GiB RAM tier in a 32 GiB group: 1.2 GiB available instead of ~11). Unit tests with mock memory.stat / memory.max values. - The per-request cold-reads line only with STRATA_COLD_OVERLAP or STRATA_IO_STATS set. - docs/DETAILS.md: the 0.2.0 Linux file-tier defaults.
This commit is contained in:
1 parent
8b1139d026
commit
82c80ac4d7
5 files changed
+111
-20
No files matched your search
@@ -65,9 +65,14 @@ struct CgroupMemoryStat {
|
||||
uint64_t file_dirty = 0;
|
||||
uint64_t file_writeback = 0;
|
||||
bool valid = false;
|
||||
uint64_t file = 0; ///< 149: memory.stat "file" (active + inactive page cache); 0 when not reported
|
||||
};
|
||||
|
||||
/// Calculate additional bytes under a finite cgroup limit after reclaiming only clean inactive file cache.
|
||||
/// Calculate additional bytes under a finite cgroup limit after reclaiming the group's clean page cache, as
|
||||
/// MemAvailable counts it on a bare host: every clean file page (active and inactive: memory.stat "file", else
|
||||
/// inactive_file), less a low-watermark share the kernel keeps (min(half the clean cache, limit / 64)). A process
|
||||
/// whose own reads (a GPU cache fill, a read-ahead) left gigabytes of active cache in its group was judged short of
|
||||
/// RAM before (149: 1.2 GiB "available" of a 32 GiB group, the file tier then switched to unbuffered reads).
|
||||
/// Returns false when the required memory.stat counters were unavailable.
|
||||
bool cgroup_available_bytes(uint64_t limit, const CgroupMemoryStat& stat, uint64_t& bytes);
|
||||
|
||||
|
||||
Reference in new issue
Block a user