diff --git a/crates/milli/src/update/index_documents/mod.rs b/crates/milli/src/update/index_documents/mod.rs index 5dc55030b..a0228e9cf 100644 --- a/crates/milli/src/update/index_documents/mod.rs +++ b/crates/milli/src/update/index_documents/mod.rs @@ -525,8 +525,7 @@ where &mut rng, dimension, is_quantizing, - // Arroy should only use 50% of the memory - self.indexer_config.max_memory.map(|mm| mm / 2), + self.indexer_config.max_memory, cancel, )?; Result::Ok(()) diff --git a/crates/milli/src/update/new/indexer/mod.rs b/crates/milli/src/update/new/indexer/mod.rs index beda7c1ee..d002317ca 100644 --- a/crates/milli/src/update/new/indexer/mod.rs +++ b/crates/milli/src/update/new/indexer/mod.rs @@ -62,6 +62,8 @@ where let mut bbbuffers = Vec::new(); let finished_extraction = AtomicBool::new(false); + let arroy_memory = grenad_parameters.max_memory; + // We reduce the actual memory used to 5%. The reason we do this here and not in Meilisearch // is because we still use the old indexer for the settings and it is highly impacted by the // max memory. So we keep the changes here and will remove these changes once we use the new @@ -70,8 +72,6 @@ where max_memory: grenad_parameters.max_memory.map(|mm| mm * 5 / 100), ..grenad_parameters }; - // Arroy should use 50% of the grenad memory instead of 5% - let arroy_memory = grenad_parameters.max_memory.map(|mm| mm * 10); // 5% percent of the allocated memory for the extractors, or min 100MiB // 5% percent of the allocated memory for the bbqueues, or min 50MiB