Range Indexes and Mapped File Initialization Errors
09 November 2021 04:23 PM
|
|
SummaryIf your index settings have a very large number of range indexes specified (on the order of thousands or even tens of thousands), you may find your MarkLogic Server instance returning a message saying that it "Cannot allocate memory" - even when your OS monitoring metrics indicate that there appears to be plenty of unused RAM. XDMP-FORESTERR: Error in startup of forest: SVC-MAPINI: Mapped file initialization error: mmap: Cannot allocate memory DetailThe issue is not how much memory a system has, but how it's being used. In the interests of performance, MarkLogic Server indexes your content upon ingestion to the system, then memory maps those indexes to serialized data structures on disk. While it's true that each of those memory maps requires some amount of RAM, if you've got thousands of indexes and system monitoring is reporting RAM to spare, then you might be running up against Linux's default vm.max_map_count value. While it's possible to get past this issue by simply increasing the vm.max_map_count limit, you should seriously consider revisiting your index usage towards the use of Template Driven Extraction (TDE), as 1) it's likely the current indexing scheme could be replaced by a different one that uses far fewer indexes and 2) when your configuration exceeds on the order of 100 or so range indexes, you'll likely need to take special care to size and manage your topology so that you don’t run out of system resources, as well as potentially make configuration changes to the linux kernel on the d-nodes to which the relevant forests are assigned. --- Additional Reading:
| |
|