Adding new documents to a Meilisearch index is a multi-threaded and memory-intensive operation. Consult this article for more information on indexing performance.
sysinfo
Rust library to calculate a machine’s total memory size. Meilisearch then adapts its behavior so indexing uses a maximum two thirds of available resources. Alternatively, you can use the --max-indexing-memory
instance option to manually control the maximum amount of RAM Meilisearch can consume.
It is important to prevent Meilisearch from using all available memory during indexing. If that happens, there are two negative consequences:
sysinfo
may not be able to calculate the amount of available RAM for certain OSes. Meilisearch still makes an educated estimate and adapts its behavior based on that, but crashes may still happen in this case. Follow this link for an exhaustive list of OSes supported by sysinfo
--max-indexing-threads
instance option. Allowing Meilisearch to use all processor cores for indexing might negatively impact your users’ search experience.
Multi-threading is unfortunately not possible in machines with only one processor core.