Archived
embed_lookup_q reads the n-gram table through a row cache and direct reads, and about half of a step's rows are first-seen, so steps wait on the drive. --ngram-table ram (default disk, unchanged) copies the table into locked huge pages in the background, checks the copy against the mapping and then serves the gather from memory. MemAvailable, RLIMIT_MEMLOCK and the cgroup limit are checked first; if any is short the table stays on disk. The flag reaches the plugin as an optional `resident` parameter of embed_lookup_q.