Experimental feature: Reduce Indexing Memory Usage #652
Replies: 2 comments 3 replies
-
|
Hi @Kerollmops |
Beta Was this translation helpful? Give feedback.
-
|
Been using Meilisearch quite happily for running a personal MCP server. Was using an old version for a while 1.9 and upgraded to v1.33 and ran into some memory issues. With this flag on a memory-constrained VPS (indexing 335K markdown documents). Results with 2GB limit: With 3GB limit + flag: Completed the full index in 52 minutes. The flag made a big difference: Instead of climbing until it dies, memory now cycles between 1.5-2.8GB and releases between operations rather than accumulating. Rate dropped from ~11K/min to ~6.5K/min as the index grew. One thing that surprised me: smaller batches didn't help memory usage. 5K batches actually used more memory than 10K at the same document counts. I'm guessing more merge cycles = higher cumulative pressure? Counterintuitive but consistent across my tests. Appreciate you adding the flag, as it lets me save a lot of costs using a cheap VPS to host my personal MCP project. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone 👋
For the v1.2 of Meilisearch (which will be released on 5th June), we will introduce an experimental feature that should help reduce the memory usage of the engine as an experimental feature.
Feature Abstract
This flag enables the
MDB_WRITEMAPoption of LMDB, making the internal key-value store use much less RAM than usual. Unfortunately, it can reduce the write speed of it and therefore slow down the engine. You can read more about this LMDB option in the lmdb.h header file.This flag cannot be enabled on Windows. This is due to a different way of handling memory maps on this system than on others i.e. Unix-like.
How to use the feature?
--experimental-reduce-indexing-memory-usageCLI flag or theMEILI_EXPERIMENTAL_REDUCE_INDEXING_MEMORY_USAGEenvironment variable. This option does not accept any values.What is an experimental feature
Why is this feature not stable yet?
We have yet to determine if a lot impacts performance and whether the RAM usage reduction is significant enough. Could you give us your feedback on whether we want to ship it?
When will the feature potentially be stable?
We have yet to determine when this feature could be stable since we need to iterate on it. As explained previously, we do not guarantee it will be stable someday.
Depending on the feedback we get, we plan to iterate on the feature every 1 or 2 releases (Currently, our release cycle is two months long).
🗣️ You are welcome to give feedback about the feature or ask any questions; we can guide you through this new feature usage!
Beta Was this translation helpful? Give feedback.
All reactions