MCPcopy Create free account
hub / github.com/Niko1221/Strata / page_cache_hint

Function page_cache_hint

engine/src/core/expert_source.cpp:208–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208std::string page_cache_hint(const std::string& meminfo_text) {
209 const uint64_t cache = meminfo_bytes(meminfo_text, "Cached") + meminfo_bytes(meminfo_text, "Buffers");
210 if (cache < (1ull << 30)) return "";
211 char msg[420];
212 std::snprintf(msg, sizeof msg,
213 "; %.1f GiB of the RAM is file cache (earlier runs' model files, which Linux gives back on demand - "
214 "'free' showing little is normal). If the start still fails, free it with: "
215 "sync; echo 1 | sudo tee /proc/sys/vm/drop_caches (or start strata serve with "
216 "STRATA_DROP_CACHE_ON_EXIT=1 so it releases its model files when it stops)",
217 (double) cache / 1073741824.0);
218 return msg;
219}
220
221bool make_cache_complement_plan(
222 int64_t n_layers, int64_t n_expert, const std::vector<uint64_t>& layer_blob_bytes,

Callers 2

pin_cache_complementMethod · 0.85
test_pin_pacingFunction · 0.85

Calls 1

meminfo_bytesFunction · 0.70

Tested by 1

test_pin_pacingFunction · 0.68