File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 85
85
#include " VocBase/LogicalCollection.h"
86
86
#include " VocBase/LogicalDataSource.h"
87
87
#include " VocBase/LogicalView.h"
88
+ #include " Basics/PhysicalMemory.h"
89
+ #include " resource_manager.hpp"
88
90
89
91
#include < absl/strings/str_cat.h>
90
92
@@ -1105,6 +1107,12 @@ void IResearchFeature::validateOptions(
1105
1107
void IResearchFeature::prepare () {
1106
1108
TRI_ASSERT (isEnabled ());
1107
1109
1110
+ // Set memory limits for IResearchFeature to 50% of available memory.
1111
+ auto physicalMem = static_cast <size_t >(PhysicalMemory::getValue ());
1112
+ irs::IResearchMemoryManager::GetInstance ()->SetMemoryLimit (physicalMem / 2 );
1113
+ LOG_TOPIC (" 462d7" , INFO, arangodb::iresearch::TOPIC) << " Setting IResearch memory limit to " <<
1114
+ physicalMem / 2 ;
1115
+
1108
1116
// load all known codecs
1109
1117
::irs::formats::init ();
1110
1118
You can’t perform that action at this time.
0 commit comments